### Question:
Scene { public void draw(List<? extends Pair<Integer, Integer>> coordinateList) { LOGGER.info("Start drawing next frame"); LOGGER.info("Current buffer: " + current + " Next buffer: " + next); frameBuffers[next].clearAll(); coordinateList.forEach(coordinate -> { var x = coordinate.getKey(); var y = coordinate.getValue(); frameBuffers[next].draw(x, y); }); LOGGER.info("Swap current and next buffer"); swap(); LOGGER.info("Finish swapping"); LOGGER.info("Current buffer: " + current + " Next buffer: " + next); } Scene(); void draw(List<? extends Pair<Integer, Integer>> coordinateList); Buffer getBuffer();  }### Answer:
@Test public void testDraw() { try { var scene = new Scene(); var field1 = Scene.class.getDeclaredField("current"); var field2 = Scene.class.getDeclaredField("next"); field1.setAccessible(true); field1.set(scene, 0); field2.setAccessible(true); field2.set(scene, 1); scene.draw(new ArrayList<>()); Assert.assertEquals(1, field1.get(scene)); Assert.assertEquals(0, field2.get(scene)); } catch (NoSuchFieldException | IllegalAccessException e) { Assert.fail("Fail to access private field"); } }