EqualMatch { public boolean match(String left, String right) { if (left.startsWith("\"") && left.endsWith("\"")) { left = left.substring(1, left.length() - 1); } if (right.startsWith("\"") && right.endsWith("\"")) { right = left.substring(1, right.length() - 1); } return Objects.equals(left, right); }  boolean match(String left, String right); boolean match(Object left, Object right);  }
@Test public void integerShouldEqualWhenLargerThan128() { Integer a = 334; Integer b = 334; boolean match = new EqualMatch().match(a, b); assertTrue(match); }
@Test public void longShouldEqualWhenLargerThan128() { Long a = 334L; Long b = 334L; boolean match = new EqualMatch().match(a, b); assertTrue(match); }
@Test public void doubleShouldEqualWhenLargerThan128() { Double a = 334.0; Double b = 334.0; boolean match = new EqualMatch().match(a, b); assertTrue(match); }
@Test public void floatShouldEqualWhenLargerThan128() { Float a = 334.0F; Float b = 334.0F; boolean match = new EqualMatch().match(a, b); assertTrue(match); }
@Test public void stringShouldEqual() { assertTrue(new EqualMatch().match("\"a\"", "a")); assertTrue(new EqualMatch().match("a", "a")); assertFalse(new EqualMatch().match("\"a\"", "ab")); }