### Question:
CharDatum extends Datum { @Override public long asInt8() { return Long.valueOf(getString()); } CharDatum(byte val);  CharDatum(char val);  CharDatum(byte [] bytes);  CharDatum(String val); @Override char asChar(); @Override short asInt2(); @Override int asInt4(); @Override long asInt8(); @Override byte[] asByteArray(); @Override float asFloat4(); @Override double asFloat8(); @Override byte asByte(); @Override String asChars(); @Override int size(); @Override int hashCode(); @Override boolean equals(Object obj); @Override Datum equalsTo(Datum datum); @Override int compareTo(Datum datum);  }### Answer:
@Test public final void testAsLong() { Datum d = DatumFactory.createChar("5"); assertEquals(5l,d.asInt8()); }