### Question:
AuthorizationFlowHandler { public static AuthorizationFlowHandler setup(OAuthConfig config, TokenRepository tokenRepository) { if(!config.isValid()) { throw new IllegalArgumentException("The provided OAuth configuration was not valid. Please mandatory attributes."); } return new AuthorizationFlowHandler(config, tokenRepository, new WebFormHandler(config), new AuthorizationApiHandler(config)); } AuthorizationFlowHandler(OAuthConfig config, TokenRepository tokenRepository, WebFormHandler webFormHandler, AuthorizationApiHandler authorizationApiHandler); static AuthorizationFlowHandler setup(OAuthConfig config, TokenRepository tokenRepository); static AuthorizationFlowHandler setup(OAuthConfig config); static TokenProvider fromRepository(OAuthConfig config, TokenRepository tokenRepository); TokenProvider authorize(String username, String password);  }### Answer:
@Test(expected = IllegalArgumentException.class) public void testInstantiate_whenOAuthConfigIsNotValid_shouldThrowException() { OAuthConfig config = OAuthConfig.builder().build(); AuthorizationFlowHandler.setup(config); }