@Test
public void generateUnauthTokenExceptionTest() throws Exception {

    // Setup:
    when(mobiTokenVerifier.generateToken(anyString(), anyString(), anyString(), anyLong(), any(Map.class))).thenThrow(new JOSEException(""));
    thrown.expect(MobiException.class);
    SignedJWT result = manager.generateUnauthToken();
    assertEquals(jwt, result);
    verify(mobiTokenVerifier).generateToken("anon", SimpleTokenManager.ISSUER, SimpleTokenManager.ANON_SCOPE, 86400000, null);
}