/** * Helper method that checks if the number of results and the number of expected results are the * same and if the expected results are contained in the results. */ private boolean contains(Object[] results, Object[] expectedResult) { for (Object result : results) { assertThat(result, instanceOf(Object[].class)); if (checkArraysAreEqual((Object[]) result, expectedResult)) { return true; } } return false; }