UniformSampler implements Sampler, Serializable { @Override public int getSize() { return size; } UniformSampler();  UniformSampler(int size); @Override Iterable<Object> get(); void add(Object o); @Override Sampler cloneEmpty(); @Override int getSize(); @Override boolean equals(Object o); @Override int hashCode();  }
@Test public void testMerge() { UniformSampler sampler = new UniformSampler(10); Iterable<Sampler> subsamples = getSubsamples(uniformSample); Sampler s = SamplerUtil.INSTANCE.merge(subsamples, Optional.of(sampler)); assertEquals(s.getSize(), 10); }