Complete the code to import the JUnit test annotation.
import org.junit.jupiter.api.[1];
The @Test annotation marks a method as a test method in JUnit 5.
Complete the code to write a simple test method named testAddition.
@Test public void [1]() { int sum = 2 + 3; org.junit.jupiter.api.Assertions.assertEquals(5, sum); }
@Test annotation.The test method should be named testAddition as requested.
Fix the error in the assertion to correctly check that result equals 10.
int result = 5 + 5; org.junit.jupiter.api.Assertions.assertEquals([1], result);
result as expected value.The expected value should be the integer 10, not a string or variable.
Fill both blanks to create a test method that checks if multiply(2, 3) returns 6.
@Test public void [1]() { int output = multiply(2, 3); org.junit.jupiter.api.Assertions.[2](6, output); }
assertTrue instead of assertEquals.The method name should be testMultiply and the assertion method is assertEquals to compare expected and actual values.
Fill all three blanks to write a test method that verifies isEven(4) returns true.
@Test public void [1]() { boolean result = isEven([2]); org.junit.jupiter.api.Assertions.[3](result); }
assertEquals instead of assertTrue for boolean checks.The method name is testIsEven, the input is 4, and the assertion is assertTrue to check the boolean result.