When I run coverage on my code below:
private static String mapMyVal(String val) {
switch (val) {
case "foo":
return "FOO_FOO";
case "bar":
return "BARR";
default:
throw new InvalidArgumentException();
}
}
I see "8 out of 10 conditions covered" when I run my unit tests on this with coverage. However I see all three lines being covered inside the statement.
Since there are no other conditions than "foo", "bar" and everything else, what are those missing two conditions?