RawData implements Serializable { public ByteBuffer getData() { return data; } RawData(ByteBuffer data, Map<String, List<String>> metadata); ByteBuffer getData(); Map<String, List<String>> getMetadata();  }
@Test public void rawDataNullMetadataTest() throws Exception { ByteBuffer bytes = ByteBuffer.allocate(10); for (int i = 0; i < 10; i++) { bytes.put((byte)'a'); } RawData rawData = new RawData(bytes, null); assertEquals(bytes, rawData.getData()); }