### Question:
JWTPrincipal implements JsonWebToken { public boolean isUserInRole(String role) { return roles.contains(role) || groups.contains(role); } JWTPrincipal();  JWTPrincipal(JsonObject jwt, String stringForm, RoleProcessor roleProcessor); @Override String getName(); @Override String getRawToken(); @Override String getIssuer(); @Override Set<String> getAudience(); @Override String getSubject(); @Override String getTokenID(); @Override long getExpirationTime(); @Override long getIssuedAtTime(); @Override Set<String> getGroups(); @Override Set<String> getClaimNames(); @Override T getClaim(String s); boolean isUserInRole(String role); JsonObject getJwt(); String getGivenName(); String getFamilyName(); String getEmail();  }### Answer:
@Test public void handlesNoRealmAccess() { JWTPrincipal JWTPrincipal = new JWTPrincipal(Json.createObjectBuilder().build(), null, new RoleProcessor(Collections.emptySet())); assertThat(JWTPrincipal.isUserInRole("role3")).isFalse(); }