use of org.eclipse.che.api.factory.server.bitbucket.server.BitbucketUser in project devspaces-images by redhat-developer.
the class HttpBitbucketServerApiClientTest method testGetUser.
@Test
public void testGetUser() throws ScmItemNotFoundException, ScmUnauthorizedException, ScmCommunicationException {
stubFor(get(urlEqualTo("/rest/api/1.0/users/ksmster")).withHeader(HttpHeaders.AUTHORIZATION, equalTo(AUTHORIZATION_TOKEN)).willReturn(aResponse().withHeader("Content-Type", "application/json; charset=utf-8").withBodyFile("bitbucket/rest/api/1.0/users/ksmster/response.json")));
BitbucketUser user = bitbucketServer.getUser("ksmster");
assertNotNull(user);
}
Aggregations