OutputConversionEngine { public Object convertOutput(Object anObject) { Object convertedOutput = anObject; for (ListIterator<OutputConverter> it = outputConverters.listIterator(outputConverters.size()); it.hasPrevious();) { OutputConverter outputConverter = it.previous(); Object conversionResult = outputConverter.convertOutput(convertedOutput); if (conversionResult != null) { convertedOutput = conversionResult; } } return convertedOutput; }  void addConverter(OutputConverter converter); boolean removeConverter(OutputConverter converter); Object convertOutput(Object anObject); void addDeclaredConverters(Object handler);  }
@Test public void testConvertOutput() { System.out.println("convertOutput"); String toBeConverted = "a"; String expected = "([a])"; assertEquals(expected, converter.convertOutput(toBeConverted)); }