### Question:
TextDatum extends Datum { @Override public double asFloat8() { return Double.valueOf(new String(bytes)); } TextDatum(byte[] bytes);  TextDatum(String string); @Override boolean asBool(); @Override byte asByte(); @Override short asInt2(); @Override int asInt4(); @Override long asInt8(); @Override float asFloat4(); @Override double asFloat8(); @Override byte[] asByteArray(); String asChars(); @Override byte[] asTextBytes(); @Override int size(); @Override int compareTo(Datum datum); @Override boolean equals(Object obj); @Override Datum equalsTo(Datum datum); @Override int hashCode(); @Override String toString(); static final TextDatum EMPTY_TEXT; static final Comparator<byte[]> COMPARATOR; }### Answer:
@Test public final void testAsFloat8() { Datum d = DatumFactory.createText("12345"); assertTrue(12345.0d == d.asFloat8()); }