CausedFocusEventWrapper { public static boolean isFocusEventWithCause(AWTEvent e) { if (SystemInfoRt.IS_AT_LEAST_JAVA9) { return e instanceof FocusEvent; } else { return e instanceof FocusEvent; } } CausedFocusEventWrapper(FocusEvent e); @VisibleForTesting  CausedFocusEventWrapper(Enum<?> cause); boolean isTraversal(); boolean isTraversalForward(); boolean isTraversalBackward(); boolean isTraversalUp(); boolean isTraversalDown(); static boolean isFocusEventWithCause(AWTEvent e); @Nullable static CausedFocusEventWrapper newInstanceOrNull(AWTEvent e);  }
@Test public void testIsFocusEventWithCause() { if (SystemInfoRt.IS_AT_LEAST_JAVA9) { Assert.assertTrue(CausedFocusEventWrapper.isFocusEventWithCause(new FocusEvent(Mockito.mock(Component.class), 0))); } }