Hej mam problem jak porownac czy wartosci w liscie sa prawidlowe po wykonaniu metody, Wiem ze musze to zrobic za pomoca assert. Metoda dziala poprawnie bo pobiera tylko wartosci parzyste (porownanie wielkosci listy sie zgadza)
@Test
public void testOddNumbersExterminatorNormalList() {
//Given
OddNumbersExterminator exterminator = new OddNumbersExterminator();
ArrayList<Integer> normalList = new ArrayList<>();
normalList.add(4);
normalList.add(7);
normalList.add(8);
normalList.add(11);
normalList.add(13);
normalList.add(16);
normalList.add(18);
normalList.add(19);
//When
ArrayList<Integer> normalTestList = exterminator.exterminate(new ArrayList<Integer>(normalList));
//Then
Assert.assertEquals(4, normalTestList.size());
Assert.assertEquals((4, 8 , 16, 18), normalTestList);
}