@Test public void testSetList() throws Exception { BranchingServiceCollection services = createServiceCollection(); services.setServices(Arrays.asList(new Service[] { branchService, lowService, highService })); services.setFirstServiceId(FIRST_SERVICE_ID); start(services); stop(services); NullService illegalService1 = new NullService(); illegalService1.setUniqueId(BRANCH_HIGH); try { services.setServices(Arrays.asList(new Service[] { branchService, lowService, highService, illegalService1 })); fail("Initialised with duplicate service-id"); } catch (IllegalArgumentException expected) { } NullService illegalService2 = new NullService(); illegalService2.setUniqueId(""); try { services.setServices(Arrays.asList(new Service[] { branchService, lowService, highService, illegalService2 })); fail("Initialised with '' service-id"); } catch (IllegalArgumentException expected) { } }
public void setFirstServiceId(String s) { firstServiceId = Args.notBlank(s, "firstServiceId"); }
BranchingServiceCollection extends ServiceCollectionImp { public void setFirstServiceId(String s) { firstServiceId = Args.notBlank(s, "firstServiceId"); } }
BranchingServiceCollection extends ServiceCollectionImp { public void setFirstServiceId(String s) { firstServiceId = Args.notBlank(s, "firstServiceId"); } BranchingServiceCollection();  BranchingServiceCollection(Collection<Service> list); }
BranchingServiceCollection extends ServiceCollectionImp { public void setFirstServiceId(String s) { firstServiceId = Args.notBlank(s, "firstServiceId"); } BranchingServiceCollection();  BranchingServiceCollection(Collection<Service> list); String getFirstServiceId(); void setFirstServiceId(String s); BranchingServiceCollection withFirstServiceId(String s); }
BranchingServiceCollection extends ServiceCollectionImp { public void setFirstServiceId(String s) { firstServiceId = Args.notBlank(s, "firstServiceId"); } BranchingServiceCollection();  BranchingServiceCollection(Collection<Service> list); String getFirstServiceId(); void setFirstServiceId(String s); BranchingServiceCollection withFirstServiceId(String s);  }