### Question:
MatchRatingApproachEncoder implements StringEncoder { String removeDoubleConsonants(final String name) { String replacedName = name.toUpperCase(); for (final String dc : DOUBLE_CONSONANT) { if (replacedName.contains(dc)) { final String singleLetter = dc.substring(0, 1); replacedName = replacedName.replace(dc, singleLetter); } } return replacedName; }  @Override final Object encode(final Object pObject); @Override final String encode(String name); boolean isEncodeEquals(String name1, String name2);  }### Answer:
@Test public final void testRemoveSingleDoubleConsonants_BUBLE_RemovedSuccessfully() { assertEquals("BUBLE", this.getStringEncoder().removeDoubleConsonants("BUBBLE")); }
@Test public final void testRemoveDoubleConsonants_MISSISSIPPI_RemovedSuccessfully() { assertEquals("MISISIPI", this.getStringEncoder().removeDoubleConsonants("MISSISSIPPI")); }
@Test public final void testRemoveDoubleDoubleVowel_BEETLE_NotRemoved() { assertEquals("BEETLE", this.getStringEncoder().removeDoubleConsonants("BEETLE")); }