UserInfoResolver { public void setUserInfoEndpoint(String userInfoEndpoint) { try { this.userInfoEndpoint = new URI(userInfoEndpoint); } catch (NullPointerException | URISyntaxException e) { throw new IllegalStateException("Invalid userInfoEndpoint " + e.getMessage()); } }  static UserInfoResolver from(Map<String, String> parameters); void setUserInfoEndpoint(String userInfoEndpoint); UserInfoResolver initialize(Properties properties); UserInfoResolver initialize(); UserInfo resolve(AccessToken accessToken); @Override String toString();  }
@Test(expected = IllegalStateException.class) public void setUserInfoEndpoint_shouldFailWithNull() { UserInfoResolver userInfoResolver = new UserInfoResolver(); userInfoResolver.setUserInfoEndpoint(null); }