### Question:
SpectrumUtils { public Varbindsdecode translateEventTable(EventTable et, String parmId) { Varbindsdecode vbd = new Varbindsdecode(); vbd.setParmid(parmId); for (Integer key : et.keySet()) { Decode decode = new Decode(); decode.setVarbindvalue(key.toString()); decode.setVarbinddecodedstring(et.get(key)); vbd.addDecode(decode); } return vbd; } SpectrumUtils(); String translateAllSubstTokens(EventFormat format); String translateFormatSubstToken(String inToken); List<Varbindsdecode> translateAllEventTables(EventFormat ef, String eventTablePath); Varbindsdecode translateEventTable(EventTable et, String parmId); String translateSeverity(int spectrumSeverity); void setModelTypeAssetField(String fieldName); String getModelTypeAssetField();  }### Answer:
@Test public void translateSimpleEventTable() { EventTable et = new EventTable("foobar"); et.put(1, "foo"); et.put(2, "bar"); et.put(3, "baz"); Varbindsdecode vbd = m_utils.translateEventTable(et, "parm[#1]"); Assert.assertEquals("Parm ID is parm[#1]", "parm[#1]", vbd.getParmid()); Assert.assertEquals("Three decode elements", 3, vbd.getDecodeCount()); Assert.assertEquals("First key is 1", "1", vbd.getDecode(0).getVarbindvalue()); Assert.assertEquals("First value is foo", "foo", vbd.getDecode(0).getVarbinddecodedstring()); Assert.assertEquals("Second key is 2", "2", vbd.getDecode(1).getVarbindvalue()); Assert.assertEquals("Second value is bar", "bar", vbd.getDecode(1).getVarbinddecodedstring()); Assert.assertEquals("Third key is 3", "3", vbd.getDecode(2).getVarbindvalue()); Assert.assertEquals("Third value is baz", "baz", vbd.getDecode(2).getVarbinddecodedstring()); }