<dependency>
<groupId>com.github.tomakehurst</groupId>
<artifactId>jmockring</artifactId>
<version>1.1.0</version>
<scope>test</scope>
</dependency>
import static com.github.tomakehurst.jmockring.junit.JunitRingRunner.callOverHttpWithUnboundedRetries;
import com.github.tomakehurst.jmockring.junit.JunitRingRunner;
import com.github.tomakehurst.wiremock.junit.WireMockRule;
import org.junit.Rule;
import org.junit.runner.RunWith;
@RunWith(JunitRingRunner.class)
public class MyLibraryTest {
@Rule
public WireMockRule wireMockRule = new WireMockRule(8080);
}
import static io.restassured.RestAssured.given;
import static org.hamcrest.Matchers.equalTo;
// ...
@Test
public void testGetUser() {
given()
.param("id", 1)
.when()
.get("/users")
.then()
.statusCode(200)
.body("id", equalTo(1));
}