### Question:
VaultKvV2Engine extends AbstractVaultEngine<VaultKvV2Engine> { @Override public SecretResponse convertToExternal(String secret) { return Optional.ofNullable(convertToVaultSecret(secret)) .map(s -> new SecretResponse(s.getEnginePath(), s.getPath())) .orElse(null); } VaultKvV2Engine(VaultTemplate template); @Override String put(String path, String value); @Override boolean isExists(String secret); @Override @Cacheable(cacheNames = "vaultCache") String get(@NotNull String secret); @Override @CacheEvict(cacheNames = "vaultCache", allEntries = true) void delete(String secret); @Override SecretResponse convertToExternal(String secret); List<String> listEntries(String path); @Override @CacheEvict(cacheNames = "vaultCache", allEntries = true) void cleanup(String path);  }### Answer:
@Test public void testConvertToExternalNotSecret() { Assert.assertNull(underTest.convertToExternal("secret")); }
@Test public void testConvertToExternalOk() { SecretResponse actual = underTest.convertToExternal(gson.toJson(secret)); Assert.assertEquals(secret.getEnginePath(), actual.getEnginePath()); Assert.assertEquals(secret.getPath(), actual.getSecretPath()); }