FilteredSharedComponentStart implements SharedComponentLifecycleStrategy { public void setIncludes(List<String> l) { this.includes = Args.notNull(l, "includes"); } FilteredSharedComponentStart();  FilteredSharedComponentStart(Boolean threaded); @Override void init(Collection<AdaptrisConnection> conns); @Override void start(Collection<AdaptrisConnection> conns); @Override void stop(Collection<AdaptrisConnection> conns); @Override void close(Collection<AdaptrisConnection> conns); Boolean getThreadedStart(); void setThreadedStart(Boolean b); List<String> getIncludes(); void setIncludes(List<String> l); List<String> getExcludes(); void setExcludes(List<String> l); void addInclude(String pattern); void addExclude(String pattern); Collection<AdaptrisConnection> filter(Collection<AdaptrisConnection> original);  }
@Test public void testSetIncludes() throws Exception { FilteredSharedComponentStart starter = new FilteredSharedComponentStart(); assertNotNull(starter.getIncludes()); assertEquals(0, starter.getIncludes().size()); starter.setIncludes(new ArrayList(Arrays.asList("abcde"))); assertNotNull(starter.getIncludes()); assertEquals(1, starter.getIncludes().size()); assertEquals("abcde", starter.getIncludes().get(0)); starter.addInclude("xyz"); assertEquals(2, starter.getIncludes().size()); assertEquals("xyz", starter.getIncludes().get(1)); try { starter.setIncludes(null); fail(); } catch (IllegalArgumentException expected) { } assertEquals(2, starter.getIncludes().size()); assertEquals("abcde", starter.getIncludes().get(0)); assertEquals("xyz", starter.getIncludes().get(1)); }