AtlasDeserializers { public static byte[] deserializeRow(NameMetadataDescription description, JsonNode node) { return deserializeRowish(description, node, true); } private  AtlasDeserializers(); static byte[] deserializeRowPrefix(NameMetadataDescription description,
            JsonNode node); static byte[] deserializeRow(NameMetadataDescription description,
            JsonNode node); static Iterable<byte[]> deserializeRows(final NameMetadataDescription description,
            JsonNode node); static Iterable<byte[]> deserializeNamedCols(final ColumnMetadataDescription colDescription,
            JsonNode node); static byte[] deserializeCol(ColumnMetadataDescription colDescription,
            JsonNode node); static Iterable<Cell> deserializeCells(final TableMetadata metadata,
            JsonNode node); static Map<Cell, byte[]> deserializeCellVals(final TableMetadata metadata,
            JsonNode node); static byte[] deserializeVal(ColumnValueDescription description,
            JsonNode node);  }
@Test public void testDeserializeRowFromJsonList() throws Exception { JsonNode jsonNode = new ObjectMapper().readTree("[68, \"Smeagol\"]"); byte[] row = AtlasDeserializers.deserializeRow(NAME_METADATA_DESCRIPTION, jsonNode); byte[] expectedRow = Bytes.concat(ValueType.FIXED_LONG.convertFromString("68"), ValueType.STRING.convertFromString("Smeagol")); Assert.assertArrayEquals(expectedRow, row); }
@Test public void testDeserializeRowFromJsonMap() throws Exception { JsonNode jsonNode = new ObjectMapper().readTree("{\"age\":68, \"name\":\"Smeagol\"}"); byte[] row = AtlasDeserializers.deserializeRow(NAME_METADATA_DESCRIPTION, jsonNode); byte[] expectedRow = Bytes.concat(ValueType.FIXED_LONG.convertFromString("68"), ValueType.STRING.convertFromString("Smeagol")); Assert.assertArrayEquals(expectedRow, row); }