import org.testng.annotations.Test; public class TriangleTest { @Test(expectedExceptions = NumberFormatException.class ) public void testCalcAreaFail() throws Exception { Triangle triangle = new Triangle(); triangle.calcArea(-130, 135); } }