### Question:
VirtualIndexBuffer extends IndexBuffer { @Override public int size() { return numIndices; } VirtualIndexBuffer(int numVerts, Mode meshMode); @Override int get(); @Override void rewind(); @Override int remaining(); @Override int get(int i); @Override IndexBuffer put(int i, int value); @Override int size(); @Override Buffer getBuffer(); @Override IndexBuffer put(int value); @Override Format getFormat();  }### Answer:
@Test public void testSize() { final VirtualIndexBuffer bufferTriangleFan = new VirtualIndexBuffer(5, Mode.TriangleFan); assertEquals(9, bufferTriangleFan.size()); final VirtualIndexBuffer bufferLineLoop = new VirtualIndexBuffer(8, Mode.LineLoop); assertEquals(15, bufferLineLoop.size()); final VirtualIndexBuffer bufferPoints = new VirtualIndexBuffer(8, Mode.Points); assertEquals(8, bufferPoints.size()); final VirtualIndexBuffer bufferLines = new VirtualIndexBuffer(8, Mode.Lines); assertEquals(8, bufferLines.size()); final VirtualIndexBuffer bufferLineStrip = new VirtualIndexBuffer(8, Mode.LineStrip); assertEquals(14, bufferLineStrip.size()); final VirtualIndexBuffer bufferTriangles = new VirtualIndexBuffer(8, Mode.Triangles); assertEquals(8, bufferTriangles.size()); final VirtualIndexBuffer bufferTriangleStrip = new VirtualIndexBuffer(8, Mode.TriangleStrip); assertEquals(18, bufferTriangleStrip.size()); }