Skip to content

Instantly share code, notes, and snippets.

@minisu
Created April 2, 2014 13:24
Show Gist options
  • Save minisu/9934009 to your computer and use it in GitHub Desktop.
Save minisu/9934009 to your computer and use it in GitHub Desktop.
@Test
public void startingAndFetch()
{
ClientResponse response = resources.client().resource( ENDPOINT )
.type( MediaType.APPLICATION_JSON )
.header( HttpHeaders.AUTHORIZATION, "Bearer DUMMYTOKEN" )
.post( ClientResponse.class, dummyJson );
assertThat( response.getStatus(), is( 201 ) );
TestRun testRun = resources.client().resource( response.getLocation() )
.header( HttpHeaders.AUTHORIZATION, "Bearer DUMMYTOKEN" )
.get( TestRun.class );
assertThat( testRun.getTestId(), is( notNullValue() ) );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment