@Test public void testUpdateResourceHolderWhenNoResponseInterceptorsShouldNotSetInterceptors() { given(temporaryStubResourceHolder.getResponseInterceptors()).willReturn(null); underTest.updateResourceHolder(); verify(stubResourceHolder, BDDMockito.never()).setRequestInterceptors(null); }
public void updateResourceHolder() { stubResourceHolder.setConditionChekers(new ArrayList<>(temporaryStubResourceHolder.getConditionCheckers())); stubResourceHolder.setResponseFormatters(new ArrayList<>(temporaryStubResourceHolder.getResponseFormatters())); stubResourceHolder.setTemplates(new HashMap<>(temporaryStubResourceHolder.getTemplates())); updateRequestInterceptors(); updateResponseInterceptors(); stubResourceHolder.setSequenceHandlers(new ArrayList<>(temporaryStubResourceHolder.getSequenceHandlers())); }
StubResourceHolderUpdater { public void updateResourceHolder() { stubResourceHolder.setConditionChekers(new ArrayList<>(temporaryStubResourceHolder.getConditionCheckers())); stubResourceHolder.setResponseFormatters(new ArrayList<>(temporaryStubResourceHolder.getResponseFormatters())); stubResourceHolder.setTemplates(new HashMap<>(temporaryStubResourceHolder.getTemplates())); updateRequestInterceptors(); updateResponseInterceptors(); stubResourceHolder.setSequenceHandlers(new ArrayList<>(temporaryStubResourceHolder.getSequenceHandlers())); } }
StubResourceHolderUpdater { public void updateResourceHolder() { stubResourceHolder.setConditionChekers(new ArrayList<>(temporaryStubResourceHolder.getConditionCheckers())); stubResourceHolder.setResponseFormatters(new ArrayList<>(temporaryStubResourceHolder.getResponseFormatters())); stubResourceHolder.setTemplates(new HashMap<>(temporaryStubResourceHolder.getTemplates())); updateRequestInterceptors(); updateResponseInterceptors(); stubResourceHolder.setSequenceHandlers(new ArrayList<>(temporaryStubResourceHolder.getSequenceHandlers())); }  }
StubResourceHolderUpdater { public void updateResourceHolder() { stubResourceHolder.setConditionChekers(new ArrayList<>(temporaryStubResourceHolder.getConditionCheckers())); stubResourceHolder.setResponseFormatters(new ArrayList<>(temporaryStubResourceHolder.getResponseFormatters())); stubResourceHolder.setTemplates(new HashMap<>(temporaryStubResourceHolder.getTemplates())); updateRequestInterceptors(); updateResponseInterceptors(); stubResourceHolder.setSequenceHandlers(new ArrayList<>(temporaryStubResourceHolder.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 updateResourceHolder() { stubResourceHolder.setConditionChekers(new ArrayList<>(temporaryStubResourceHolder.getConditionCheckers())); stubResourceHolder.setResponseFormatters(new ArrayList<>(temporaryStubResourceHolder.getResponseFormatters())); stubResourceHolder.setTemplates(new HashMap<>(temporaryStubResourceHolder.getTemplates())); updateRequestInterceptors(); updateResponseInterceptors(); stubResourceHolder.setSequenceHandlers(new ArrayList<>(temporaryStubResourceHolder.getSequenceHandlers())); }  void updateResourceHolder(); void clearTemporaryResourceHolder(); void addDocumentToResourceHolder(final String groupName, final Document document); void addDocumentToResourceHolder(final String groupName, final JSONObject jsonObject); void initializeTemporaryResourceHolder();  }