### Question:
EncryptedSecret { public static boolean isEncryptedSecret(String secretConfig) { return secretConfig != null && (matchesEncryptedStringSyntax(secretConfig) || matchesEncryptedFileSyntax(secretConfig)); } EncryptedSecret(String secretConfig); static EncryptedSecret parse(String secretConfig); static boolean isEncryptedSecret(String secretConfig); static boolean isEncryptedFile(String secretConfig); static final String ENCRYPTED_STRING_PREFIX; static final String ENCRYPTED_FILE_PREFIX; }### Answer:
@Test public void invalidFormat() { String secretConfig = "encrypted:aws-kms!no-colon-included!"; assertEquals(false, EncryptedSecret.isEncryptedSecret(secretConfig)); }
@Test public void isEncryptedSecretShouldReturnTrue() { String secretConfig = "encrypted:aws-kms!foo:bar"; assertEquals(true, EncryptedSecret.isEncryptedSecret(secretConfig)); }