SFDCServiceImpl implements SFDCService { @Override public Map<String, Object> getLimits() { if (!isConnected()) { return null; } String baseUrl = null; try { baseUrl = sfdcSession.getEndPoint() + REST_ENDPOINT_URI + "/limits"; HttpGet get = new HttpGet(baseUrl); Object responseObject = handleRequest(get); if (responseObject == null) { return null; } if (responseObject instanceof Map) { return (Map<String, Object>) responseObject; } return null; } catch (UnsupportedEncodingException e) { logger.error("Error retrieving Salesforce API Limits", e); return null; } catch (ClientProtocolException e) { logger.error("Error retrieving Salesforce API Limits", e); return null; } catch (IOException e) { logger.error("Error retrieving Salesforce API Limits", e); return null; } catch (HttpException e) { logger.error("Error retrieving Salesforce API Limits", e); return null; } }  void setPersistenceService(PersistenceService persistenceService); void setDefaultSFDCConfiguration(SFDCConfiguration defaultSFDCConfiguration); SFDCSession getSFDCSession(); @Override SFDCConfiguration loadConfiguration(); @Override boolean saveConfiguration(SFDCConfiguration sfdcConfiguration); void start(); void stop(); Set<String> getRecentLeadIds(); Map<String, Object> getSObject(String sobjectName, String objectId); Map<String, Object> getSObjectDescribe(String sobjectName); Map<String, Object> getLead(String leadId); Set<String> getLeadMandatoryFields(); boolean deleteLead(String leadId); Set<String> findLeadIdsByIdentifierValue(String identifierFieldValue); @Override String createOrUpdateLead(Profile profile); @Override boolean updateProfileFromLead(Profile profile); @Override Map<String, Object> query(String query); @Override Map<String, Object> getLimits(); void setupPushListener(String channelName, ClientSessionChannel.MessageListener messageListener); boolean login(SFDCConfiguration sfdcConfiguration); void logout(); boolean isConfigured(); boolean isConnected();  }
@Test public void testGetLimits() { if (!checkCanRunTests()) return; Map<String,Object> limits = sfdcServiceImpl.getLimits(); assertNotNull("Limits object is null, an error occurred !", limits); }