Matcher { public boolean match(int[] expected, int[] actual, int clipLimit, int delta) { for (int i = 0; i < actual.length; i++) if (actual[i] > clipLimit) actual[i] = clipLimit; if (actual.length != expected.length) return false; for (int i = 0; i < actual.length; i++) if (Math.abs(expected[i] - actual[i]) > delta) return false; return true; } Matcher(); boolean match(int[] expected, int[] actual, 
        int clipLimit, int delta);  }
@Test public void testMatch() { Matcher matcher = new Matcher(); int[] expected = new int[] { 10, 50, 30, 98 }; int clipLimit = 100; int delta = 5; int[] actual = new int[] { 12, 55, 25, 110 }; assertTrue(matcher.match(expected, actual, clipLimit, delta)); actual = new int[] { 10, 60, 30, 98 }; assertTrue(!matcher.match(expected, actual, clipLimit, delta)); actual = new int[] { 10, 50, 30 }; assertTrue(!matcher.match(expected, actual, clipLimit, delta)); }