### Question:
CurrentUserReference implements UserReference { @Override public boolean isGlobal() { throw new RuntimeException("You need to resolve the current user first to find if it's a global user or not."); } private  CurrentUserReference(); @Override boolean isGlobal(); static final CurrentUserReference INSTANCE; }### Answer:
@Test void isGlobal() { Throwable exception = assertThrows(RuntimeException.class, () -> CurrentUserReference.INSTANCE.isGlobal()); assertEquals("You need to resolve the current user first to find if it's a global user or not.", exception.getMessage()); }