RemoteControlledSampler implements Sampler { @Override public SamplingStatus sample(String operation, long id) { return sampler.sample(operation, id); } private  RemoteControlledSampler(Builder builder); @Override SamplingStatus sample(String operation, long id); @Override boolean equals(Object sampler); @Override void close(); static final String TYPE; }
@Test public void testSample() throws Exception { undertest.sample("op", 1L); verify(initialSampler).sample("op", 1L); }