public static Map<String, Object> toMap(final Object object) {
        try {
            String json = MAPPER.writeValueAsString(object);
            final MapType mapType = MAPPER.getTypeFactory().constructMapType(LinkedHashMap.class, String.class, Object.class);
            return MAPPER.readValue(json, mapType);
        } catch (IOException e) {
            LOG.warn("write to map error: " + object, e);
            return new LinkedHashMap<>();
        }
    }
@Test
    public void testToMap() {
        TestObject testObject = JsonUtils.jsonToObject(EXPECTED_JSON, TestObject.class);
        Map<String, Object> testObjectMap = JsonUtils.toMap(testObject);
        assertNotNull(testObjectMap);
        assertEquals(testObjectMap.get("name"), "test object");
    }