@Test
public void testAccessTokenIsNotValidIfServerRestarts() {

    ByteBuffer username = getAcceptableUsername();
    ByteBuffer password = getSecurePassword();
    service.create(username, password, Role.ADMIN);
    AccessToken token = service.tokens.issue(username);
    UserService service2 = UserService.create(current); // simulate
                                                        // server
                                                        // restart by
                                                        // creating new
                                                        // service
    Assert.assertFalse(service2.tokens.isValid(token));
}