@SuppressWarnings("unchecked")
protected IOpenShiftConnection getConnection(IRestService service, final String login, final String password) throws IOException, OpenShiftException {
RestResponse response =
(RestResponse) service.request(
new Link("Get API", "/api", HttpMethod.GET),
IHttpClient.NO_TIMEOUT,
Collections.<Parameter> emptyList(),
Collections.<Parameter> emptyList());
return new APIResource(login, password, service, (Map<String, Link>) response.getData());
}