@Test
/**
* Test method for {@link org.martinlaw.auth. OpenIDSuccessAuthenticationSuccessHandler#emailSetupOk()}
*/
public void testEmailSetupOk() throws IOException {
ConfigurationService cfgSvc = mock(ConfigurationService.class);
when(cfgSvc.getPropertyValueAsString(anyString())).thenReturn("");
OpenIDSuccessAuthenticationSuccessHandler successHander = new OpenIDSuccessAuthenticationSuccessHandler();
successHander.setConfigurationService(cfgSvc);
assertFalse("no email config params exist", successHander.emailSetupOk());
when(cfgSvc.getPropertyValueAsString(MartinlawConstants.EmailParameters.HOST_PROPERTY)).thenReturn("host");
assertFalse("not all email config params exist", successHander.emailSetupOk());
when(cfgSvc.getPropertyValueAsString(MartinlawConstants.EmailParameters.PORT_PROPERTY)).thenReturn("port");
assertTrue("all email config params exist", successHander.emailSetupOk());
}