### Question:
MatchRatingApproachEncoder implements StringEncoder { @Override public final Object encode(final Object pObject) throws EncoderException { if (!(pObject instanceof String)) { throw new EncoderException( "Parameter supplied to Match Rating Approach encoder is not of type java.lang.String"); } return encode((String) pObject); }  @Override final Object encode(final Object pObject); @Override final String encode(String name); boolean isEncodeEquals(String name1, String name2);  }### Answer:
@Test public final void testGetEncoding_HARPER_HRPR() { assertEquals("HRPR", this.getStringEncoder().encode("HARPER")); }
@Test public final void testGetEncoding_SMITH_to_SMTH() { assertEquals("SMTH", this.getStringEncoder().encode("Smith")); }
@Test public final void testGetEncoding_SMYTH_to_SMYTH() { assertEquals("SMYTH", this.getStringEncoder().encode("Smyth")); }
@Test public final void testGetEncoding_Space_to_Nothing() { assertEquals("", this.getStringEncoder().encode(" ")); }
@Test public final void testGetEncoding_NoSpace_to_Nothing() { assertEquals("", this.getStringEncoder().encode("")); }
@Test public final void testGetEncoding_Null_to_Nothing() { assertEquals("", this.getStringEncoder().encode(null)); }
@Test public final void testGetEncoding_One_Letter_to_Nothing() { assertEquals("", this.getStringEncoder().encode("E")); }