EllipsisIntegrityChecker extends AbstractTextUnitIntegrityChecker { @Override public void check(String sourceContent, String targetContent) throws EllipsisIntegrityCheckerException { if (sourceContent.contains("…") && targetContent.contains("...")) { throw new EllipsisIntegrityCheckerException("Ellipsis in source and target are different"); } }  @Override void check(String sourceContent, String targetContent);  }
@Test public void testEllipsisIntegrityCheckWorks() throws EllipsisIntegrityCheckerException { String source = "Select…"; String target = "선택…"; checker.check(source, target); }
@Test(expected = EllipsisIntegrityCheckerException.class) public void testEllipsisIntegrityCheckCatchesIncorrectEllipsis() throws EllipsisIntegrityCheckerException { String source = "Select…"; String target = "선택..."; checker.check(source, target); }