}
}
@Test
public void generate() {
IntArrayCallback mock = EasyMock.createMock(IntArrayCallback.class);
final int maxSum = 10;
mock.call(EasyMock.aryEq(new int[0]));
for (int i = 0; i <= maxSum; ++i) {
mock.call(EasyMock.aryEq(new int[] {i}));
for (int j = 0; j <= maxSum - i; ++j) {
mock.call(EasyMock.aryEq(new int[] {i, j}));
for (int k = 0; k <= maxSum - i - j; ++k) {
mock.call(EasyMock.aryEq(new int[] {i, j, k}));
}
}
}
EasyMock.replay(mock);
TestUtils.generateSpec(3, maxSum, mock);