### Question:
DataBuffer { public abstract T get(); DataBuffer(ByteBuffer buffer, DataType datatype); static DataBuffer create(ByteBuffer buffer, DataType datatype); static DataBuffer create(int size, DataType datatype); static DataBuffer<T> resample(DataBuffer<T> buffer, Dimension from, Dimension to); ByteBuffer buffer(); abstract T get(); T get(int i); DataBuffer<T> put(Object val); DataBuffer<T> put(int i, T val); DataBuffer<T> flip(); DataBuffer<T> rewind(); DataBuffer<T> word(); int size(); DataType datatype();  }### Answer:
@Test public void testGet() throws Exception { ByteBuffer bbuf = ByteBuffer.allocate(16); bbuf.asIntBuffer().put(1).put(2).put(3).put(4); DataBuffer<Byte> nbuf = DataBuffer.create(bbuf, DataType.BYTE); for (int i = 0; i < 4; i++) { assertEquals(0, nbuf.get().byteValue()); assertEquals(0, nbuf.get().byteValue()); assertEquals(0, nbuf.get().byteValue()); assertEquals((byte)(i+1), nbuf.get().byteValue()); } }