SecondScreen implements GazeMotionListener { @Override public void gazeMoved(final Point2D position) { light(position); } SecondScreen(final Stage stage2, final Lighting[][] lightingArray); void close(); void light(final Point2D rawCoordinates); @Override void gazeMoved(final Point2D position);  }
@Test void shouldLightWhenGazeMoved() { Lighting[][] mockLighting = lightingArray; for (int i = 0; i < mockLighting.length; i++) { for (int j = 0; j < mockLighting[i].length; j++) { mockLighting[i][j] = mock(Lighting.class); } } SecondScreen secondScreen = new SecondScreen(mockStage, mockLighting); secondScreen.gazeMoved(new Point2D(1, 1)); verify(mockLighting[1 / 20][1 / 20]).enter(); }