### Question:
CuboidBlockMaterialBuffer extends ImmutableCuboidBlockMaterialBuffer { public void setHorizontalLayer(int y, int height, BlockMaterial material) { setHorizontalLayer(y, height, material.getId(), material.getData()); } CuboidBlockMaterialBuffer(CuboidBlockMaterialBuffer buffer);  CuboidBlockMaterialBuffer(CuboidBlockMaterialBuffer buffer, boolean backBuffer);  CuboidBlockMaterialBuffer(int baseX, int baseY, int baseZ, int sizeX, int sizeY, int sizeZ, short[] id, short[] data);  CuboidBlockMaterialBuffer(int baseX, int baseY, int baseZ, int sizeX, int sizeY, int sizeZ, short[] id, short[] data, boolean backBuffer);  CuboidBlockMaterialBuffer(int baseX, int baseY, int baseZ, int sizeX, int sizeY, int sizeZ);  CuboidBlockMaterialBuffer(int baseX, int baseY, int baseZ, int sizeX, int sizeY, int sizeZ, boolean backBuffer);  CuboidBlockMaterialBuffer(double baseX, double baseY, double baseZ, double sizeX, double sizeY, double sizeZ);  CuboidBlockMaterialBuffer(double baseX, double baseY, double baseZ, double sizeX, double sizeY, double sizeZ, boolean backBuffer);  CuboidBlockMaterialBuffer(Vector3f base, Vector3f size);  CuboidBlockMaterialBuffer(Vector3f base, Vector3f size, boolean backBuffer); @Override void copyElement(int thisIndex, int sourceIndex, int runLength); @Override void setSource(CuboidBuffer source); void setHorizontalLayer(int y, int height, BlockMaterial material); void setHorizontalLayer(int y, int height, short id, short data); void set(int x, int y, int z, BlockMaterial material); void set(int x, int y, int z, short id, short data); void flood(BlockMaterial material); @Override short[] getRawId(); @Override short[] getRawData(); ImmutableCuboidBlockMaterialBuffer getBackBuffer();  }### Answer:
@Test public void testSetLayer() { CuboidBlockMaterialBuffer buffer = new CuboidBlockMaterialBuffer(5, 5, 5, 10, 22, 10); final int yStart = 6, height = 8; final short id = 12, data = 14; buffer.setHorizontalLayer(yStart, height, id, data); Vector3f base = buffer.getBase(); Vector3f top = buffer.getTop(); for (int x = base.getFloorX(); x < top.getFloorX(); x++) { for (int z = base.getFloorZ(); z < top.getFloorZ(); z++) { for (int y = base.getFloorZ(); y < top.getFloorY(); y++) { if (y >= yStart && y < (yStart + height)) { assertEquals(buffer.getId(x, y, z), id); assertEquals(buffer.getData(x, y, z), data); } else { assertNotEquals(buffer.getId(x, y, z), id); assertNotEquals(buffer.getData(x, y, z), data); } } } } }