StubConfigurationSaverService { public void saveStubConfigurations() throws JsonTransformationException { cleaner.cleanCache(); Map<String, StubDescriptor> descriptors = routingService.getStubDescriptors(); saver.saveAllStubConfigurations(descriptors); }  void saveStubConfigurations();  }
@Test public void testSaveStubConfigurationsShouldCallCleanerThenSaver() throws JsonTransformationException { underTest.saveStubConfigurations(); verify(cleaner).cleanCache(); verify(saver).saveAllStubConfigurations(descriptors); }