### Question:
LegacyPropertiesSecurityRealm implements SecurityRealm { public static Builder builder() { return new Builder(); } private  LegacyPropertiesSecurityRealm(Builder builder); @Override RealmIdentity getRealmIdentity(final Principal principal); @Override SupportLevel getCredentialAcquireSupport(final Class<? extends Credential> credentialType, final String algorithmName, final AlgorithmParameterSpec parameterSpec); @Override SupportLevel getEvidenceVerifySupport(final Class<? extends Evidence> evidenceType, final String algorithmName); void load(InputStream usersStream, InputStream groupsStream); long getLoadTime(); static Builder builder();  }### Answer:
@Test public void testDefaultFile() throws IOException { SecurityRealm realm = LegacyPropertiesSecurityRealm.builder() .setUsersStream(this.getClass().getResourceAsStream("empty.properties")) .build(); assertNotNull("SecurityRealm", realm); }
@Test public void testPlainFileSpecialChars() throws Exception { SecurityRealm realm = LegacyPropertiesSecurityRealm.builder() .setUsersStream(this.getClass().getResourceAsStream("clear-special.properties")) .setPlainText(true) .build(); testClear(realm, "elytron", "password"); testClear(realm, "space man", "space password"); testClear(realm, "elytronumlautöäü", "password"); testClear(realm, "elytron用戶", "password"); testClear(realm, "backslash\\", "password"); testClear(realm, "backslash\\inthemiddle", "password"); testClear(realm, "dn=elytron,dc=wildfly,dc=org", "password"); testClear(realm, "elytron1", "pass=word"); testClear(realm, "elytron2", "password\\"); testClear(realm, "elytron3", "pass\\word"); testClear(realm, "elytron4", "passwordWithumlautöäü"); testClear(realm, "elytron5", "用戶"); }
@Test public void testHashedFile_colonAsDelimiter() throws Exception { SecurityRealm realm = LegacyPropertiesSecurityRealm.builder() .setUsersStream(this.getClass().getResourceAsStream("colondelimiter.properties")) .build(); checkVerifyIdentity(realm, "elytron", ELYTRON_PASSWORD_CLEAR); }