@Test public void testOneAggregatorSucceedsOtherFail() throws Exception { AggregationResponse subclientResponse = mock(AggregationResponse.class); KSISigningService succeedingClient = initSucceedingSigningClient(subclientResponse); SigningHAService haService = new SigningHAService.Builder().addServices(Arrays.asList( initFailingSigningClient("Test failed. Client 1"), succeedingClient, initFailingSigningClient("Test failed. Client 3"))) .build(); AggregationResponse haServiceResponse = haService.sign(mock(DataHash.class), 0L).getResult(); Assert.assertEquals(haServiceResponse, subclientResponse); }
public Future<AggregationResponse> sign(DataHash dataHash, Long level) throws KSIException { return signingHAService.sign(dataHash, level); }
HAService implements KSISigningService, KSIExtendingService { public Future<AggregationResponse> sign(DataHash dataHash, Long level) throws KSIException { return signingHAService.sign(dataHash, level); } }
HAService implements KSISigningService, KSIExtendingService { public Future<AggregationResponse> sign(DataHash dataHash, Long level) throws KSIException { return signingHAService.sign(dataHash, level); } private  HAService(SigningHAService signingHAService, ExtendingHAService extendingHAService); }
HAService implements KSISigningService, KSIExtendingService { public Future<AggregationResponse> sign(DataHash dataHash, Long level) throws KSIException { return signingHAService.sign(dataHash, level); } 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<AggregationResponse> sign(DataHash dataHash, Long level) throws KSIException { return signingHAService.sign(dataHash, level); } 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();  }