@Test
public void testResetUserPin() throws Exception {

    neo.unlockAdmin(adminPin);
    boolean locked = false;
    int tries = 10;
    while (!locked && tries-- > 0) {
        try {
            neo.unlockUser("foobar");
        } catch (IncorrectPINException e) {
            locked = e.getTriesRemaining() == 0;
        }
    }
    assertTrue(locked);
    neo.resetUserPin(userPin);
    neo.unlockUser(userPin);
}