Java, Code Coverage, Jacoco, Programming, Technology.
assertThrows(ArithmeticException.class, () -> calculator.divide(1, 0)); } } Use Parameterized Tests Parameterized tests allow you to run the same test with different parameters. This technique is useful for testing a variety of input values with the same test logic, thereby increasing code coverage