public int add(Object o) {
        HollowTypeMapper typeMapper = getTypeMapper(o.getClass(), null, null);
        return typeMapper.write(o);
    }
@Test
    public void testEnumAndInlineClass() throws IOException {
        HollowObjectMapper mapper = new HollowObjectMapper(writeStateEngine);

        mapper.add(TestEnum.ONE);
        mapper.add(TestEnum.TWO);
        mapper.add(TestEnum.THREE);

        roundTripSnapshot();

        HollowPrimaryKeyIndex idx = new HollowPrimaryKeyIndex(readStateEngine, new PrimaryKey("TestEnum", "_name"));

        int twoOrdinal = idx.getMatchingOrdinal("TWO");

        GenericHollowObject obj = new GenericHollowObject(readStateEngine, "TestEnum", twoOrdinal);

        Assert.assertEquals("TWO", obj.getString("_name"));

        GenericHollowObject subObj = obj.getObject("testClass");

        Assert.assertEquals(2, subObj.getInt("val1"));
        Assert.assertEquals(3, subObj.getInt("val2"));
    }