BoundedSetFactory { public BoundedSet<V> singleton(V el) { BoundedSetImpl bs = new BoundedSetImpl(); bs.add(el); return bs; } BoundedSetFactory(int limit); BoundedSet<V> empty(); BoundedSet<V> singleton(V el); BoundedSet<V> top();  }
@Test public void testSingleton() { for(int i : TEST_BOUNDS) { BoundedSet<String> bs = new BoundedSetFactory<String>(i).singleton("foo"); assert(bs.getSize() == 1); assert(bs.getSet().size() == 1); } }