### Question:
OffByN implements CharacterComparator { @Override public boolean equalChars(char x, char y) { return (Math.abs((int) x - (int) y) == N); } OffByN(int N); @Override boolean equalChars(char x, char y);  }### Answer:
@Test public void testequalChars1() { CharacterComparator OffByN = new OffByN(5); assertFalse(OffByN.equalChars('a', 'b')); }
@Test public void testequalChars2() { CharacterComparator OffByN = new OffByN(5); assertTrue(OffByN.equalChars('a', 'f')); }