### Question:
SAPOfflineTokenServicesCloud implements ResourceServerTokenServices, InitializingBean { @Override public void afterPropertiesSet() { tokenValidator = jwtValidatorBuilder.build(); } SAPOfflineTokenServicesCloud();  SAPOfflineTokenServicesCloud(OAuth2ServiceConfiguration serviceConfiguration);  SAPOfflineTokenServicesCloud(OAuth2ServiceConfiguration serviceConfiguration,
			RestOperations restOperations);   SAPOfflineTokenServicesCloud(OAuth2ServiceConfiguration serviceConfiguration,
			JwtValidatorBuilder jwtValidatorBuilder); SAPOfflineTokenServicesCloud withAnotherServiceConfiguration(
			OAuth2ServiceConfiguration otherServiceConfiguration); @Override OAuth2Authentication loadAuthentication(@Nonnull String accessToken); @Override void afterPropertiesSet(); @Override OAuth2AccessToken readAccessToken(String accessToken); SAPOfflineTokenServicesCloud setLocalScopeAsAuthorities(boolean extractLocalScopesOnly);  }### Answer:
@Test public void createInstanceWithEmptyConfiguration_throwsException() { cut = new SAPOfflineTokenServicesCloud(Mockito.mock(OAuth2ServiceConfiguration.class)); assertThatThrownBy(() -> cut.afterPropertiesSet()).isInstanceOf(IllegalArgumentException.class); }
@Test public void afterPropertiesSet() { cut = new SAPOfflineTokenServicesCloud(Mockito.mock(OAuth2ServiceConfiguration.class), jwtValidatorBuilderSpy); Mockito.verify(jwtValidatorBuilderSpy, times(0)).build(); cut.afterPropertiesSet(); Mockito.verify(jwtValidatorBuilderSpy, times(1)).build(); }