@Test
@SuppressWarnings("unchecked")
public void testValidAudience() {

    Map<String, Object> claims = new HashMap<>();
    claims.put("aud", "api://default");
    Jwt badJwt = mock(Jwt.class);
    when(badJwt.getAudience()).thenReturn(new ArrayList(claims.values()));
    assertThat(validator.validate(badJwt).hasErrors()).isFalse();
}