@Test public void testOneExtenderSucceedsOtherFail() throws Exception { ExtensionResponse subclientResponse = mock(ExtensionResponse.class); KSIExtendingService succeedingClient = initSucceedingExtenderClient(subclientResponse); ExtendingHAService haService = new ExtendingHAService.Builder().addServices(Arrays.asList( initFailingExtenderClient("Test failed. Client 1"), succeedingClient, initFailingExtenderClient("Test failed. Client 3"))) .build(); ExtensionResponse haServiceResponse = haService.extend(mock(Date.class), mock(Date.class)).getResult(); Assert.assertEquals(haServiceResponse, subclientResponse); }
public Future<ExtensionResponse> extend(Date aggregationTime, Date publicationTime) throws KSIException { return extendingHAService.extend(aggregationTime, publicationTime); }
HAService implements KSISigningService, KSIExtendingService { public Future<ExtensionResponse> extend(Date aggregationTime, Date publicationTime) throws KSIException { return extendingHAService.extend(aggregationTime, publicationTime); } }
HAService implements KSISigningService, KSIExtendingService { public Future<ExtensionResponse> extend(Date aggregationTime, Date publicationTime) throws KSIException { return extendingHAService.extend(aggregationTime, publicationTime); } private  HAService(SigningHAService signingHAService, ExtendingHAService extendingHAService); }
HAService implements KSISigningService, KSIExtendingService { public Future<ExtensionResponse> extend(Date aggregationTime, Date publicationTime) throws KSIException { return extendingHAService.extend(aggregationTime, publicationTime); } private  HAService(SigningHAService signingHAService, ExtendingHAService extendingHAService); Future<AggregationResponse> sign(DataHash dataHash, Long level); Future<ExtensionResponse> extend(Date aggregationTime, Date publicationTime); void registerAggregatorConfigurationListener(ConfigurationListener<AggregatorConfiguration> listener); Future<AggregatorConfiguration> getAggregationConfiguration(); void registerExtenderConfigurationListener(ConfigurationListener<ExtenderConfiguration> listener); Future<ExtenderConfiguration> getExtendingConfiguration(); List<KSISigningService> getSubSigningServices(); List<KSIExtendingService> getSubExtendingServices(); void close(); @Override String toString(); }
HAService implements KSISigningService, KSIExtendingService { public Future<ExtensionResponse> extend(Date aggregationTime, Date publicationTime) throws KSIException { return extendingHAService.extend(aggregationTime, publicationTime); } private  HAService(SigningHAService signingHAService, ExtendingHAService extendingHAService); Future<AggregationResponse> sign(DataHash dataHash, Long level); Future<ExtensionResponse> extend(Date aggregationTime, Date publicationTime); void registerAggregatorConfigurationListener(ConfigurationListener<AggregatorConfiguration> listener); Future<AggregatorConfiguration> getAggregationConfiguration(); void registerExtenderConfigurationListener(ConfigurationListener<ExtenderConfiguration> listener); Future<ExtenderConfiguration> getExtendingConfiguration(); List<KSISigningService> getSubSigningServices(); List<KSIExtendingService> getSubExtendingServices(); void close(); @Override String toString();  }