### Question:
SecretSession { public void clearCachedSecrets() { secretCache.clear(); secretFileCache.clear(); for (SecretEngine se : secretManager.getSecretEngineRegistry().getSecretEngineList()) { se.clearCache(); } } SecretSession(SecretManager secretManager); String decrypt(String encryptedSecret); Path decryptAsFile(String encryptedSecret); byte[] decryptAsBytes(String encrypted); void clearCachedSecrets(); void addCachedSecret(String encrypted, String decrypted); void addCachedSecretFile(String encrypted, Path decrypted);  }### Answer:
@Test public void clearCachedSecretsShouldClearAllCaches() { assertEquals(1, secretSession.secretCache.size()); assertEquals(1, secretSession.secretFileCache.size()); secretSession.clearCachedSecrets(); assertEquals(0, secretSession.secretCache.size()); assertEquals(0, secretSession.secretFileCache.size()); verify(secretEngine, times(1)).clearCache(); }