### Question:
ShortString implements EncodableData { public static ShortString parse(ByteBuf buf) { int size = buf.readUnsignedByte(); byte[] data = new byte[size]; buf.readBytes(data); return new ShortString(size, data); } @SuppressFBWarnings("EI_EXPOSE_REP2")  ShortString(long length, byte[] content); long getSize(); void write(ByteBuf buf); static ShortString parse(ByteBuf buf); static ShortString parseString(String data); @Override String toString(); @Override boolean equals(Object obj); @Override int hashCode(); boolean isEmpty();  }### Answer:
@Test public void testParse() throws Exception { ByteBuf buf = Unpooled.buffer(DEFAULT_DATA_STRING.length() + 1); DEFAULT_TEST_OBJECT.write(buf); ShortString parsedObject = ShortString.parse(buf); Assert.assertEquals(parsedObject, DEFAULT_TEST_OBJECT, "Encoding and decoding should match to same object"); }