### Question:
TypedLiteralImpl extends AbstractLiteral implements Serializable { @Override public int hashCode() { return hashCode; } TypedLiteralImpl(String lexicalForm, IRI dataType); IRI getDataType(); @Override String getLexicalForm(); @Override int hashCode(); @Override String toString(); @Override Language getLanguage();  }### Answer:
@Test public void typedLiteralEquality() { String stringValue = "some text"; IRI uriRef = new IRI("http: Literal literal1 = new TypedLiteralImpl(stringValue, uriRef); Literal literal2 = new TypedLiteralImpl(stringValue, uriRef); Assert.assertEquals(literal1, literal2); Assert.assertEquals(literal1.hashCode(), literal2.hashCode()); Literal literal3 = new TypedLiteralImpl("something else", uriRef); Assert.assertFalse(literal1.equals(literal3)); IRI uriRef2 = new IRI("http: Literal literal4 = new TypedLiteralImpl(stringValue, uriRef2); Assert.assertFalse(literal1.equals(literal4)); }
@Test public void checkHashCode() { String stringValue = "some text"; IRI uriRef = new IRI("http: Literal literal = new TypedLiteralImpl(stringValue, uriRef); Assert.assertEquals(stringValue.hashCode() + uriRef.hashCode(), literal.hashCode()); }