### Question:
FrequencyMeasurement extends BasicMeasurement { @Override public String toString() { String ret = new String(); for (String cat : d_categories) { if (!ret.equals("")) { ret += " / "; } ret += cat + " = " + (getFrequencies().get(cat) == null ? "N/A" : getFrequencies().get(cat)); } return ret; } private  FrequencyMeasurement();  FrequencyMeasurement(PopulationCharacteristic cv);  FrequencyMeasurement(List<String> categories, Map<String, Integer> map); void setFrequency(String category, Integer freq); Integer getFrequency(String category); String[] getCategories(); void add(FrequencyMeasurement other); boolean isOfType(VariableType type); @Override Set<Entity> getDependencies(); @Override String toString(); @Override FrequencyMeasurement clone(); @Override boolean equals(Object o); @Override int hashCode(); static final String PROPERTY_FREQUENCIES; }### Answer:
@Test public void testToString() { d_meas.setFrequency(getCat(d_cv, 0), 25); d_meas.setFrequency(getCat(d_cv, 1), 50); String expected = "Male = 25 / Female = 50"; assertEquals(expected, d_meas.toString()); }