@Test public void testInitializeTemporaryResourceHolderShouldInitializeResources() { List<ConditionChecker> conditionCheckers = new ArrayList<>(); List<ResponseFormatter> responseFormatters = new ArrayList<>(); List<RequestInterceptor> requestInterceptors = new ArrayList<>(); List<ResponseInterceptor> responseInterceptors = new ArrayList<>(); List<SequenceHandler> sequenceHandlers = new ArrayList<>(); given(internalResourceHolder.getConditionCheckers()).willReturn(conditionCheckers); given(internalResourceHolder.getResponseFormatters()).willReturn(responseFormatters); given(internalResourceHolder.getRequestInterceptors()).willReturn(requestInterceptors); given(internalResourceHolder.getResponseInterceptors()).willReturn(responseInterceptors); given(internalResourceHolder.getSequenceHandlers()).willReturn(sequenceHandlers); underTest.initializeTemporaryResourceHolder(); verify(temporaryStubResourceHolder).setConditionCheckers(conditionCheckers); verify(temporaryStubResourceHolder).setResponseFormatters(responseFormatters); verify(temporaryStubResourceHolder).setRequestInterceptors(requestInterceptors); verify(temporaryStubResourceHolder).setResponseInterceptors(responseInterceptors); verify(temporaryStubResourceHolder).setSequenceHandlers(sequenceHandlers); }
public void initializeTemporaryResourceHolder() { temporaryStubResourceHolder.setConditionCheckers(new ArrayList<>(internalResourceHolder.getConditionCheckers())); temporaryStubResourceHolder.setResponseFormatters(new ArrayList<>(internalResourceHolder.getResponseFormatters())); initializeRequestInterceptors(); initializeResponseInterceptors(); temporaryStubResourceHolder.setSequenceHandlers(new ArrayList<>(internalResourceHolder.getSequenceHandlers())); }
StubResourceHolderUpdater { public void initializeTemporaryResourceHolder() { temporaryStubResourceHolder.setConditionCheckers(new ArrayList<>(internalResourceHolder.getConditionCheckers())); temporaryStubResourceHolder.setResponseFormatters(new ArrayList<>(internalResourceHolder.getResponseFormatters())); initializeRequestInterceptors(); initializeResponseInterceptors(); temporaryStubResourceHolder.setSequenceHandlers(new ArrayList<>(internalResourceHolder.getSequenceHandlers())); } }
StubResourceHolderUpdater { public void initializeTemporaryResourceHolder() { temporaryStubResourceHolder.setConditionCheckers(new ArrayList<>(internalResourceHolder.getConditionCheckers())); temporaryStubResourceHolder.setResponseFormatters(new ArrayList<>(internalResourceHolder.getResponseFormatters())); initializeRequestInterceptors(); initializeResponseInterceptors(); temporaryStubResourceHolder.setSequenceHandlers(new ArrayList<>(internalResourceHolder.getSequenceHandlers())); }  }
StubResourceHolderUpdater { public void initializeTemporaryResourceHolder() { temporaryStubResourceHolder.setConditionCheckers(new ArrayList<>(internalResourceHolder.getConditionCheckers())); temporaryStubResourceHolder.setResponseFormatters(new ArrayList<>(internalResourceHolder.getResponseFormatters())); initializeRequestInterceptors(); initializeResponseInterceptors(); temporaryStubResourceHolder.setSequenceHandlers(new ArrayList<>(internalResourceHolder.getSequenceHandlers())); }  void updateResourceHolder(); void clearTemporaryResourceHolder(); void addDocumentToResourceHolder(final String groupName, final Document document); void addDocumentToResourceHolder(final String groupName, final JSONObject jsonObject); void initializeTemporaryResourceHolder(); }
StubResourceHolderUpdater { public void initializeTemporaryResourceHolder() { temporaryStubResourceHolder.setConditionCheckers(new ArrayList<>(internalResourceHolder.getConditionCheckers())); temporaryStubResourceHolder.setResponseFormatters(new ArrayList<>(internalResourceHolder.getResponseFormatters())); initializeRequestInterceptors(); initializeResponseInterceptors(); temporaryStubResourceHolder.setSequenceHandlers(new ArrayList<>(internalResourceHolder.getSequenceHandlers())); }  void updateResourceHolder(); void clearTemporaryResourceHolder(); void addDocumentToResourceHolder(final String groupName, final Document document); void addDocumentToResourceHolder(final String groupName, final JSONObject jsonObject); void initializeTemporaryResourceHolder();  }