@SuppressWarnings("unchecked")
st
public void handleLoginException() throws LoginException {

    when(resourceResolverFactory.getServiceResourceResolver()).thenThrow(LoginException.class);
    assertEquals(JobConsumer.JobResult.CANCEL, model.process(job));
}