### Question:
Product implements Serializable { public String getFieldValueAsString(String fieldName) { return fields.get(fieldName).toString(); } Product(Map<String, Object> fields); ImmutableSet<String> getFieldNames(); Object getFieldValue(String fieldName); String getFieldValueAsString(String fieldName); Double getFieldValueAsDouble(String fieldName); Long getFieldValueAsLong(String fieldName); String toString();  }### Answer:
@Test public void testString() { Map<String, Object> fields = Maps.newHashMap(); fields.put(Constants.PRODUCT_CATEGORY, "poop bags"); fields.put(Constants.PRODUCT_QUANTITY, 120); fields.put("price", 12.80); Product product = new Product(fields); assertEquals(product.getFieldValueAsString(Constants.PRODUCT_CATEGORY), "poop bags"); assertEquals(product.getFieldValueAsString("price"), "12.8"); assertEquals(product.getFieldValueAsString(Constants.PRODUCT_QUANTITY), "120"); }