How to pass assertions in the Junit framework?

How to pass assertions in the Junit framework?

Hi Ian,

It is simple to pass LambdaTest assertions in the Junit. You can refer to the below code for the same.

try {
    // some GET request
    Assert.assertEquals(ActualValue, ExpectedValue);
} catch (AssertionError e) {
    Status = "failed";
    exceptionCapture.add(e.getMessage());
    ((JavascriptExecutor) driver).executeScript("lambda-exceptions", exceptionCapture);
}