new BoxGenerator()));
when(random.nextInt(0, 2)).thenReturn(1);
}
@Test public void coaxingGeneratorToSupplyComponentForCallable() {
ArrayGenerator generator =
(ArrayGenerator) repo.generatorFor(
new GenericArrayTypeImpl(parameterized(Box.class).on(extendsOf(Object.class))));
Generator<?> arrayElementGenerator = generator.componentGenerator();
assertGenerators(arrayElementGenerator, BoxGenerator.class);
BoxGenerator boxGenerator = (BoxGenerator) componentOf(arrayElementGenerator, 0);
Generator<?> listElementGenerator = boxGenerator.componentGenerators().get(0);
assertGenerators(listElementGenerator, TestCallableGenerator.class);
TestCallableGenerator<?> callableGenerator = (TestCallableGenerator<?>) componentOf(listElementGenerator, 0);