@Test(expected = CalypsoPoPinException.class) public void verifyPinRespPars_attempts_1() { VerifyPinRespPars parser = new VerifyPinRespPars(new ApduResponse(ATTEMPTS_1, null), null); assertThat(parser.getRemainingAttemptCounter()).isEqualTo(1); parser.checkStatus(); shouldHaveThrown(CalypsoPoPinException.class); }
public int getRemainingAttemptCounter() { int attemptCounter; switch (response.getStatusCode()) { case 0x6983: attemptCounter = 0; break; case 0x63C1: attemptCounter = 1; break; case 0x63C2: attemptCounter = 2; break; case 0x9000: attemptCounter = 3; break; default: throw new IllegalStateException( "Incorrect status word: " + String.format("0x%04X", response.getStatusCode())); } return attemptCounter; }
VerifyPinRespPars extends AbstractPoResponseParser { public int getRemainingAttemptCounter() { int attemptCounter; switch (response.getStatusCode()) { case 0x6983: attemptCounter = 0; break; case 0x63C1: attemptCounter = 1; break; case 0x63C2: attemptCounter = 2; break; case 0x9000: attemptCounter = 3; break; default: throw new IllegalStateException( "Incorrect status word: " + String.format("0x%04X", response.getStatusCode())); } return attemptCounter; } }
VerifyPinRespPars extends AbstractPoResponseParser { public int getRemainingAttemptCounter() { int attemptCounter; switch (response.getStatusCode()) { case 0x6983: attemptCounter = 0; break; case 0x63C1: attemptCounter = 1; break; case 0x63C2: attemptCounter = 2; break; case 0x9000: attemptCounter = 3; break; default: throw new IllegalStateException( "Incorrect status word: " + String.format("0x%04X", response.getStatusCode())); } return attemptCounter; } VerifyPinRespPars(ApduResponse response, VerifyPinCmdBuild builder); }
VerifyPinRespPars extends AbstractPoResponseParser { public int getRemainingAttemptCounter() { int attemptCounter; switch (response.getStatusCode()) { case 0x6983: attemptCounter = 0; break; case 0x63C1: attemptCounter = 1; break; case 0x63C2: attemptCounter = 2; break; case 0x9000: attemptCounter = 3; break; default: throw new IllegalStateException( "Incorrect status word: " + String.format("0x%04X", response.getStatusCode())); } return attemptCounter; } VerifyPinRespPars(ApduResponse response, VerifyPinCmdBuild builder); int getRemainingAttemptCounter(); }
VerifyPinRespPars extends AbstractPoResponseParser { public int getRemainingAttemptCounter() { int attemptCounter; switch (response.getStatusCode()) { case 0x6983: attemptCounter = 0; break; case 0x63C1: attemptCounter = 1; break; case 0x63C2: attemptCounter = 2; break; case 0x9000: attemptCounter = 3; break; default: throw new IllegalStateException( "Incorrect status word: " + String.format("0x%04X", response.getStatusCode())); } return attemptCounter; } VerifyPinRespPars(ApduResponse response, VerifyPinCmdBuild builder); int getRemainingAttemptCounter();  }