### Question:
JNCryptorFactory { public static JNCryptor getCryptor() { if (supportedVersions.isEmpty()) { throw new IllegalStateException("No implementations registered."); } return supportedVersions.get(supportedVersions.lastKey()); } private  JNCryptorFactory(); static JNCryptor getCryptorForCiphertext(byte[] ciphertext); static JNCryptor getCryptor(); static JNCryptor getCryptor(int version); static List<JNCryptor> getCryptors();  }### Answer:
@Test public void testGetCorrectVersion() throws Exception { final int version = 2; JNCryptor cryptor = JNCryptorFactory.getCryptor(version); assertEquals(version, cryptor.getVersionNumber()); }