### Question:
BasicParameterTable implements ParameterTable { @Override public List<ParameterSet> getRows() { List<ParameterSet> results = new ArrayList<>(); for (ParameterSet element : this) { results.add(element); } return results; } BasicParameterTable(List<? extends Map<String, String>> entity); @Override Iterator<ParameterSet> iterator(); @Override boolean isEmpty(); @Override int getRowCount(); @Override Cursor newCursor(); @Override Set<String> getAvailable(); @Override Set<String> getPartial(); @Override List<ParameterSet> getRows();  }### Answer:
@Test public void builder_rows() { ParameterTable table = new BasicParameterTable.BasicBuilder() .next().put("a", "A") .next().put("b", "B") .next().put("c", "C") .build(); List<ParameterSet> rows = table.getRows(); Map<String, String> m0 = rows.get(0).toMap(); assertThat(m0.keySet(), containsInAnyOrder("a")); assertThat(m0, hasEntry("a", "A")); Map<String, String> m1 = rows.get(1).toMap(); assertThat(m1.keySet(), containsInAnyOrder("b")); assertThat(m1, hasEntry("b", "B")); Map<String, String> m2 = rows.get(2).toMap(); assertThat(m2.keySet(), containsInAnyOrder("c")); assertThat(m2, hasEntry("c", "C")); }
@Test public void builder_map() { Map<String, String> r = new LinkedHashMap<>(); r.put("b", "B"); r.put("c", "C"); ParameterTable table = new BasicParameterTable.BasicBuilder() .next() .put("a", "A") .put(r) .build(); List<ParameterSet> rows = table.getRows(); Map<String, String> map = rows.get(0).toMap(); assertThat(map.keySet(), containsInAnyOrder("a", "b", "c")); assertThat(map, hasEntry("a", "A")); assertThat(map, hasEntry("b", "B")); assertThat(map, hasEntry("c", "C")); }
@Test public void builder() { ParameterTable table = new BasicParameterTable.BasicBuilder() .next() .put("a", "A") .build(); List<ParameterSet> rows = table.getRows(); Map<String, String> map = rows.get(0).toMap(); assertThat(map.keySet(), containsInAnyOrder("a")); assertThat(map, hasEntry("a", "A")); }
@Test public void builder_columns() { ParameterTable table = new BasicParameterTable.BasicBuilder() .next() .put("a", "A") .put("b", "B") .put("c", "C") .build(); List<ParameterSet> rows = table.getRows(); Map<String, String> map = rows.get(0).toMap(); assertThat(map.keySet(), containsInAnyOrder("a", "b", "c")); assertThat(map, hasEntry("a", "A")); assertThat(map, hasEntry("b", "B")); assertThat(map, hasEntry("c", "C")); }