Okay well I figured out how to test the contents of my list properly if anyone is wondering here is my test case:
@Test
public void testMinCoins() {
System.out.println("minCoins");
int[] coins = {25,10,5,1};
int amount = 10;
Lab7 instance = new Lab7();
List<Integer> expected = new ArrayList<>();
expected.add(25);
List result = instance.minCoins(coins, amount);
assertEquals(expected, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
So that is good. However, I still don't understand how to test my NullPointerException. I have tried a few different things to no avail. The problem I am having is that I can not seem to find the correct method for testing for my specific IDE which is NetBeans. Either that or the IDE doesn't matter and my JUnit version is the problem. I can't seem to figure out which version of JUnit I am running.
If someone could show me how to test my NullPointerException that would be great!