GroupedParameterBuilder implements ParameterBuilder { @Override public List<Object> getParameters() { List<Object> result = new LinkedList<>(); for (int i = 0; i < parameterBuilders.size(); i++) { result.addAll(getParameters(i)); } result.addAll(genericParameterBuilder.getParameters()); return result; } GroupedParameterBuilder(final List<List<Object>> groupedParameters, final List<Object> genericParameters); @Override List<Object> getParameters(); List<Object> getParameters(final int count); Optional<String> getDerivedColumnName();  }
@Test public void assertGetParameters() { GroupedParameterBuilder actual = new GroupedParameterBuilder(createGroupedParameters(), new LinkedList<>()); assertThat(actual.getParameters(), is(Arrays.<Object>asList(3, 4, 5, 6))); }
@Test public void assertGetParametersWithGenericParameters() { GroupedParameterBuilder actual = new GroupedParameterBuilder(createGroupedParameters(), createGenericParameters()); assertThat(actual.getParameters(), is(Arrays.<Object>asList(3, 4, 5, 6, 7, 8))); assertThat(actual.getGenericParameterBuilder().getParameters(), is(Arrays.<Object>asList(7, 8))); }
@Test public void assertGetGenericParametersWithModify() { GroupedParameterBuilder actual = new GroupedParameterBuilder(new LinkedList<>(), createGenericParameters()); actual.getGenericParameterBuilder().addReplacedParameters(0, 77); actual.getGenericParameterBuilder().addReplacedParameters(1, 88); actual.getGenericParameterBuilder().addAddedParameters(0, Arrays.asList(66, -1)); actual.getGenericParameterBuilder().addAddedParameters(2, Arrays.asList(99, 110)); actual.getGenericParameterBuilder().addRemovedParameters(1); assertThat(actual.getGenericParameterBuilder().getParameters(), is(Arrays.<Object>asList(66, 77, 88, 99, 110))); }