### Question:
ObjectConverter { private ObjectConverter() { } private  ObjectConverter();   }### Answer:
@Test public void testObjectConverter() { Contact contact = new Contact(); contact.linkedPersons.addAll(Arrays.asList(new Person("f1", "l1"), new Person("f2", "l2"))); contact.linkedPersonsArray = new Person[] { new Person("f3", "l3"), new Person("f4", "l4") }; contact.personMap.put("cinq", new Person("f5", "l5")); contact.personMap.put("six", new Person("f6", "l6")); MapperBuilder mapperBuilder = new MapperBuilder(); mapperBuilder.addConverter(Person.class, new PersonConverter()); Mapper mapper = mapperBuilder.setAccessModeName("both").setAttributeOrder(new Comparator<String>() { @Override public int compare(final String o1, final String o2) { return o1.compareTo(o2); } }).build(); String s = mapper.writeObjectAsString(contact); Contact c = mapper.readObject(s, Contact.class); String expected = "{\"linkedPersons\":[\"f1|l1\",\"f2|l2\"],\"linkedPersonsArray\":[\"f3|l3\",\"f4|l4\"],\"personMap\":{\"cinq\":\"f5|l5\",\"six\":\"f6|l6\"}}"; Assert.assertEquals(expected, s); Assert.assertEquals(contact, c); }