### Question:
FrequencyMeasurement extends BasicMeasurement { @Override public boolean equals(Object o) { if (o instanceof FrequencyMeasurement) { FrequencyMeasurement m = (FrequencyMeasurement) o; if (!d_categories.equals(m.d_categories)) { return false; } return frequenciesEqual(getFrequencies(), m.getFrequencies()); } return false; } 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 testEquals() { FrequencyMeasurement m = d_meas.clone(); d_meas.setFrequency(getCat(d_cv, 0), 25); d_meas.setFrequency(getCat(d_cv, 1), 50); assertFalse(d_meas.equals(m)); m = d_meas.clone(); assertEquals(d_meas, m); assertFalse(d_meas.equals(null)); assertFalse(d_meas.equals("")); }