### Question:
Soundex implements StringEncoder { public Soundex() { this.soundexMapping = US_ENGLISH_MAPPING; } Soundex();  Soundex(final char[] mapping);  Soundex(final String mapping); int difference(final String s1, final String s2); @Override Object encode(final Object obj); @Override String encode(final String str); @Deprecated int getMaxLength(); @Deprecated void setMaxLength(final int maxLength); String soundex(String str); static final String US_ENGLISH_MAPPING_STRING; static final Soundex US_ENGLISH; }### Answer:
@Test public void testNewInstance() { Assert.assertEquals("W452", new Soundex().soundex("Williams")); }
@Test public void testNewInstance2() { Assert.assertEquals("W452", new Soundex(Soundex.US_ENGLISH_MAPPING_STRING.toCharArray()).soundex("Williams")); }
@Test public void testNewInstance3() { Assert.assertEquals("W452", new Soundex(Soundex.US_ENGLISH_MAPPING_STRING).soundex("Williams")); }
@Test public void testUsEnglishStatic() { Assert.assertEquals("W452", Soundex.US_ENGLISH.soundex("Williams")); }