### Question:
Nysiis implements StringEncoder { @Override public Object encode(final Object obj) throws EncoderException { if (!(obj instanceof String)) { throw new EncoderException("Parameter supplied to Nysiis encode is not of type java.lang.String"); } return this.nysiis((String) obj); } Nysiis();  Nysiis(final boolean strict); @Override Object encode(final Object obj); @Override String encode(final String str); boolean isStrict(); String nysiis(String str);  }### Answer:
@Test public void testTrueVariant() { final Nysiis encoder = new Nysiis(true); final String encoded = encoder.encode("WESTERLUND"); Assert.assertTrue(encoded.length() <= 6); Assert.assertEquals("WASTAR", encoded); }