### Question:
TypeConverter { public static Value asLiteral(Object o) { if (o instanceof String) { return asLiteral((String)o); } else if (o instanceof URI) { return asLiteral((URI) o); } else if (o instanceof Date) { return asLiteral((Date)o); } else if (o instanceof Integer) { return asLiteral((Integer) o); } else { return null; } }  static Value asLiteral(Object o); static Value asLiteral(Date date); static Value asResource(java.net.URI uri); static Value asLiteral(java.net.URI uri); static Value asLiteral(Integer i); static Value asLiteral(String s);  }### Answer:
@Test public void testAsLiteralObject() { String a = "stardog"; URI b = null; try { b = new URI("http: } catch (URISyntaxException e) { e.printStackTrace(); } Date c = new Date(); Integer d = new Integer(5); Value va = TypeConverter.asLiteral(a); Value vb = TypeConverter.asLiteral(b); Value vc = TypeConverter.asLiteral(c); Value vd = TypeConverter.asLiteral(d); assertNotNull(va); assertNotNull(vb); assertNotNull(vc); assertNotNull(vd); assertTrue(va.toString().contains("stardog")); assertTrue(vb.toString().contains("\"http: assertTrue(vc.toString().contains("http: assertEquals(vd.toString(), "\"5\"^^<http: }