Skip to content

Instantly share code, notes, and snippets.

@maxtomassi
Created November 20, 2014 08:25
Show Gist options
  • Select an option

  • Save maxtomassi/d3b21857171cb8760189 to your computer and use it in GitHub Desktop.

Select an option

Save maxtomassi/d3b21857171cb8760189 to your computer and use it in GitHub Desktop.
Simulating slow API with WireMock in unit test
stubFor(get(urlEqualTo("/videos")).willReturn(
aResponse()
.withStatus(200)
.withBodyFile("path/to/videos.json")
.withFixedDelay(2000)));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment