### Question:
YAMLConverter implements Converter { public String convertTo(Object inPojo) throws ConversionException { try { return YAMLConverter.YAML.dump(inPojo); } catch (final Exception e) { final String strErrorMessage = "Conversion of " + inPojo + " (" + inPojo.getClass().getName() + ") to YAML failed !\n" + e.getMessage(); YAMLConverter.LOGGER.error(strErrorMessage, e); throw new ConversionException(e, strErrorMessage); } }  String getFormatName(); T convertFrom(String inYAMLString); T convertFrom(Reader inReader); String convertTo(Object inPojo); void convertTo(Object inPojo, Writer file_name); String convertTo(Object inPojo, boolean inOption); static final String YAML_FORMAT; }### Answer:
@Test public void testconvertBinaryToYAML() throws ConversionException { final Converter yamlConverter = ConverterFactory.YAML; final String YAMLBinary = yamlConverter.convertTo(YAMLConverterTest.CRYPTIC_MESSAGE_AS_BYTES); System.out.println(YAMLBinary); }
@Test public void testconvertPojoMapToYAML() throws ConversionException { final Converter yamlConverter = ConverterFactory.YAML; final Map<String, Object> testMap = new TestMap(); testMap.put("string", "\tthat's all wright baby !\nwe''ll get there !"); testMap.put("int", 1); testMap.put("double", 3.1416); final String strYamlMap = yamlConverter.convertTo(testMap); System.out.println(strYamlMap); }