@Test public void testExample() throws Exception { Example example = new Example(10); Region<Integer, String> region = mock(Region.class); List<Integer> primes = Arrays.asList(1, 2, 3, 5, 7); ResultCollector resultCollector = mock(ResultCollector.class); when(resultCollector.getResult()).thenReturn(primes); Execution execution = mock(Execution.class); when(execution.execute(PrimeNumber.ID)).thenReturn(resultCollector); assertEquals(new HashSet(primes), example.getPrimes(region, execution)); }
public Example() { this(100); }
Example { public Example() { this(100); } }
Example { public Example() { this(100); } Example();  Example(int maximum); }
Example { public Example() { this(100); } Example();  Example(int maximum); static void main(String[] args); Set<Integer> getPrimes(Region<Integer, String> region, Execution execution); }
Example { public Example() { this(100); } Example();  Example(int maximum); static void main(String[] args); Set<Integer> getPrimes(Region<Integer, String> region, Execution execution);  }