@Test(dataProvider = "removeDuplicatesMostTwiceObjects")
public void testRemoveMostTwiceDuplicates(int[] array, int[] expected) {

    int len = new RemoveDuplicates().removeDuplicatesAtMostTwice(array);
    int[] actual = IntStream.of(array).limit(len).toArray();
    assertEquals(actual, expected);
}