Object[] findValues(int ordinal) {
        return getAllValues(ordinal, type, 0);
    }
@Test
    public void testMapObjectValueReference() throws Exception {
        MapValue val1 = new MapValue();
        val1.val = "one";

        MapValue val2 = new MapValue();
        val2.val = "two";
        Map<Integer, MapValue> map = new HashMap<>();
        map.put(1, val1);
        map.put(2, val2);

        MapObjectReference mapObjectReference = new MapObjectReference();
        mapObjectReference.mapValues = map;

        objectMapper.add(mapObjectReference);
        StateEngineRoundTripper.roundTripSnapshot(writeStateEngine, readStateEngine);

        // for values
        FieldPath fieldPath = new FieldPath(readStateEngine, "MapObjectReference", "mapValues.value");
        Object[] values = fieldPath.findValues(0);
        Assert.assertEquals(2, values.length);
        Set<String> valuesAsSet = new HashSet<>();
        for (Object v : values) valuesAsSet.add((String) v);
        Assert.assertTrue(valuesAsSet.contains("one"));
        Assert.assertTrue(valuesAsSet.contains("two"));

        // for keys
        fieldPath = new FieldPath(readStateEngine, "MapObjectReference", "mapValues.key");
        values = fieldPath.findValues(0);
        Assert.assertEquals(2, values.length);
        Set<Integer> keysAsSet = new HashSet<>();
        for (Object v : values) keysAsSet.add((int) v);
        Assert.assertTrue(keysAsSet.contains(1));
        Assert.assertTrue(keysAsSet.contains(2));
    }