// Verify control manifestation is wrapped
JComponent controlManifestation = manifestation.getControlManifestation();
Assert.assertTrue(controlManifestation instanceof ControlWrapper);
ControlWrapper controlWrapper = (ControlWrapper) controlManifestation;
GlassPanel controlGlass = controlWrapper.getGlassPanel();
manifestation.exitLockedState();
Assert.assertTrue(controlGlass.getMouseListeners().length > 0);
Assert.assertTrue(controlGlass.getKeyListeners().length > 0);
// Verify that the input listeners are removed when the glass panel is turned off
manifestation.enterLockedState();
Assert.assertEquals(controlGlass.getMouseListeners().length, 0);
Assert.assertEquals(controlGlass.getKeyListeners().length, 0);
manifestation.exitLockedState();
Graphics mockGraphics = Mockito.mock(Graphics.class);
Rectangle rectangle = new Rectangle();
Mockito.when(mockGraphics.getClipBounds()).thenReturn(rectangle);
controlGlass.paintComponent(mockGraphics);
Mockito.verify(mockGraphics).setColor(Mockito.any(Color.class));
Mockito.verify(mockGraphics).fillRect(0, 0, 0, 0);
// now check that we don't use the graphics context when we are in transparent mode
manifestation.enterLockedState();
Graphics mockGraphics2 = Mockito.mock(Graphics.class);
controlGlass.paintComponent(mockGraphics2);
Mockito.verifyNoMoreInteractions(mockGraphics2);
}