### Question:
LiteralCommons { public static String createCacheKey(String content, Locale language, URI type) { return createCacheKey(content, language != null ? language.getLanguage() : null, type != null ? type.stringValue() : null); } private  LiteralCommons(); static String createCacheKey(String content, Locale language, URI type); static String createCacheKey(String content, Locale language, String type); static String createCacheKey(DateTime date, String type); static String createCacheKey(Literal l); static String createCacheKey(String content, String language, String type); static String getXSDType(Class<?> clazz); static String getRDFLangStringType();  }### Answer:
@Test public void testCreateCacheKey() throws Exception { Assert.assertNotEquals(LiteralCommons.createCacheKey("abc",(String)null,(String)null), LiteralCommons.createCacheKey("ABC",(String)null,(String)null)); Assert.assertNotEquals(LiteralCommons.createCacheKey("abc",null,(URI)null), LiteralCommons.createCacheKey("ABC",null,(URI)null)); Repository repository = new SailRepository(new MemoryStore()); repository.initialize(); ValueFactory vf = repository.getValueFactory(); String value1 = RandomStringUtils.random(128); Literal literal1 = vf.createLiteral(value1); Assert.assertEquals(LiteralCommons.createCacheKey(value1,(String)null,(String)null),LiteralCommons.createCacheKey(literal1)); Assert.assertEquals(LiteralCommons.createCacheKey(value1,null,(URI)null),LiteralCommons.createCacheKey(literal1)); String value2 = RandomStringUtils.random(128); Locale locale2 = Locale.getDefault(); Literal literal2 = vf.createLiteral(value2,locale2.getLanguage().toLowerCase()); Assert.assertEquals(LiteralCommons.createCacheKey(value2,locale2,(String)null),LiteralCommons.createCacheKey(literal2)); Assert.assertEquals(LiteralCommons.createCacheKey(value2,locale2,(URI)null),LiteralCommons.createCacheKey(literal2)); String value3 = RandomStringUtils.randomNumeric(3); String datatype3 = Namespaces.NS_XSD + "integer"; Literal literal3 = vf.createLiteral(value3, vf.createURI(datatype3)); Assert.assertEquals(LiteralCommons.createCacheKey(value3,(String)null,datatype3),LiteralCommons.createCacheKey(literal3)); DateTime value4 = DateTime.now(); String datatype4 = LiteralCommons.getXSDType(value4.getClass()); Literal literal4 = vf.createLiteral(DateUtils.getXMLCalendar(value4)); Assert.assertEquals(datatype4,literal4.getDatatype().stringValue()); Assert.assertEquals(LiteralCommons.createCacheKey(value4,datatype4), LiteralCommons.createCacheKey(literal4)); repository.shutDown(); }