diff --git a/src/test/java/test/OTPTest.java b/src/test/java/test/OTPTest.java index cbbdf18..59a1c1b 100644 --- a/src/test/java/test/OTPTest.java +++ b/src/test/java/test/OTPTest.java @@ -108,6 +108,13 @@ public class OTPTest { OTP testOTP1 = OTP.createNewOTP(OTPType.HOTP, secret, OTPAlgorithm.MD5, 12, 0, 1, true); assertDoesNotThrow(() -> testOTP1.getPin()); + OTP testOTP2 = OTP.createNewOTP(OTPType.TOTP, secret, OTPAlgorithm.MD5, 12, 0, 1, true); + for(int i = 0; i < 1000; i++) { + assertDoesNotThrow(() -> testOTP2.getPin()); + testOTP2.incrementCounter(); + } + + //OTP testOTP2 = OTP.createNewOTP(OTPType.HOTP, Base32.encode(hexStr2Bytes(secret)), OTPAlgorithm.MD5, 12, 0, 1, true); //assertDoesNotThrow(() -> testOTP2.getPin()); });