@Test(expectedExceptions = AuthenticationException.class)
public void testNullServiceTicketHandledGracefully() throws Exception {
MockHttpServletRequest request = new MockHttpServletRequest("GET", "/demo/any-path");
request.addParameter("ticket", "ST-0-ER94xMJmn6pha35CQRoZ");
filter.setAuthenticationManager(new AuthenticationManager() {
public Authentication authenticate(Authentication a) {
throw new BadCredentialsException("Rejected");
}
});
filter.setContinueOnFail(false);