API testing
import com.shaft.driver.SHAFT;
import org.testng.annotations.Test;
public class CountryApiTest {
@Test
public void getCountryByCapital() {
SHAFT.API api = new SHAFT.API("https://restcountries.com/v3.1/");
api.get("capital/Cairo").perform();
api.assertThatResponse()
.extractedJsonValue("[0].name.common")
.isEqualTo("Egypt");
}
}
Continue with request building, authentication, and response assertions.