when(cfgSvc.getPropertyValueAsString(anyString())).thenReturn("niko");
final String sendingEmail = "mlaw.unt@mlaw.co.ke";
when(cfgSvc.getPropertyValueAsString(MartinlawConstants.EmailParameters.USERNAME_PROPERTY)).thenReturn(sendingEmail);
successHandler.setConfigurationService(cfgSvc);
// provide a mock mailer object
Mailer mailer = mock(Mailer.class);
successHandler.setMailer(mailer);
// mock the identity service - near impossible since it returns 'final' objects, which are not mockito-able
/*IdentityService idSvc = mock(IdentityService.class);
when(idSvc.getEntity(entityId)).thenReturn(entity);*/
final String principalName = "marto";