### Question:
KeysLoader { public static KeysLoader load(final File encryptionKeyFile, final File decryptionKeyFile) { Assert.notNull(encryptionKeyFile, "encryptionKeyFile must not be null"); Assert.notNull(decryptionKeyFile, "decryptionKeyFile must not be null"); final JWK encryptionKey = loadEncryptionKey(encryptionKeyFile); final ImmutableJWKSet decryptionKeySet = loadDecryptionKeys(decryptionKeyFile); validateKeys(encryptionKey, decryptionKeySet); return new KeysLoader(encryptionKey, decryptionKeySet); } private  KeysLoader(final JWK encryptionKey, final ImmutableJWKSet decryptionKeySet); static KeysLoader load(final File encryptionKeyFile, final File decryptionKeyFile); JWK getEncryptionKey(); ImmutableJWKSet getDecryptionKeySet();  }### Answer:
@Test void should_throw_exception_when_decryption_keys_do_not_include_the_encryption_key() throws IOException { givenKeysInFile(encryptionFile, KEY_1); givenKeysInFile(decryptionFile, KEY_2, KEY_3); final Throwable throwable = catchThrowable(() -> KeysLoader.load(encryptionFile, decryptionFile)); assertThat(throwable).hasMessage("Decryption keys must include the encryption key."); }
@Test void should_throw_exception_when_decryption_keys_have_duplicated_key_ids() throws IOException { givenKeysInFile(encryptionFile, KEY_1); givenKeysInFile(decryptionFile, KEY_1, "{\"kty\":\"oct\",\"alg\":\"dir\",\"k\":\"Bsd2_f0XUx7mBscwqLvnwDk-cic-3UmMst65Ws1IUBc\",\"kid\":\"key-id-1\"}"); final Throwable throwable = catchThrowable(() -> KeysLoader.load(encryptionFile, decryptionFile)); assertThat(throwable).hasMessage("Decryption keys must have unique key IDs."); }