### Question:
XmlDataSourceCompatibleJRFieldListBuilder { public List<JRField> build() { List<JRField> fields = new ArrayList<JRField>(); for (Map.Entry<String, MutableInt> entry : name2CountMap.entrySet()) { String name = entry.getKey(); MutableInt count = entry.getValue(); if (count.intValue() == 1) { fields.add(createJRField(getLabel(name), name)); } else { for (int i = 1; i <= count.intValue(); i++) { fields.add(createJRField(getLabel(name) + "_" + i, name + "[" + i + "]")); } } } return fields; }  XmlDataSourceCompatibleJRFieldListBuilder field(String name); XmlDataSourceCompatibleJRFieldListBuilder field(String name, String label); List<JRField> build();  }### Answer:
@Test public void emptyList() { List<JRField> fields = new XmlDataSourceCompatibleJRFieldListBuilder().build(); Assert.assertEquals("Unexpected number of fields", 0, fields.size()); }