Resource resource = Mockito.mock(Resource.class);
Mockito.when(resource.getModel()).thenReturn(result);
Mockito.when(context.getServiceRegistry(true)).thenReturn(serviceRegistry);
Mockito.when(context.completeStep()).thenReturn(stepResult);
Mockito.when(context.createResource(PathAddress.EMPTY_ADDRESS)).thenReturn(resource);
Mockito.when(context.readResource(PathAddress.EMPTY_ADDRESS)).thenReturn(resource);
Mockito.when(context.getProcessType()).thenReturn(ProcessType.STANDALONE_SERVER);
Mockito.when(context.getRunningMode()).thenReturn(RunningMode.NORMAL);
Mockito.when(context.isNormalServer()).thenReturn(true);
Mockito.doAnswer(new Answer<Void>() {
@Override