Report { public void write(StringBuffer buffer) throws Exception { populateMap(); Enumeration<Integer> enumeration = offeringToName.keys(); while (enumeration.hasMoreElements()) { Integer offeringId = enumeration.nextElement(); ArrayList<String> list = offeringToName.get(offeringId); writeOffering(buffer, list, Offering.find(offeringId.intValue())); } buffer.append("Number of scheduled offerings: "); buffer.append(offeringToName.size()); buffer.append("\n"); } Report(); void populateMap(); void writeOffering(StringBuffer buffer, ArrayList<String> list,
			Offering offering); void write(StringBuffer buffer);  }
@Test public void testEmptyReport() throws Exception { Schedule.deleteAll(); Report report = new Report(); StringBuffer buffer = new StringBuffer(); report.write(buffer); assertEquals("Number of scheduled offerings: 0\n", buffer.toString()); }