RestTemplateClusterManagementServiceTransport implements ClusterManagementServiceTransport { @Override @SuppressWarnings("unchecked") public <T extends AbstractConfiguration<R>, R extends RuntimeInfo> ClusterManagementListResult<T, R> submitMessageForList( T config) { String endPoint = URI_VERSION + config.getLinks().getList(); return restTemplate .exchange(endPoint + "?id={id}&group={group}", HttpMethod.GET, makeEntity(config), ClusterManagementListResult.class, config.getId(), config.getGroup()) .getBody(); } RestTemplateClusterManagementServiceTransport(RestTemplate restTemplate);  RestTemplateClusterManagementServiceTransport(
      ConnectionConfig connectionConfig);  RestTemplateClusterManagementServiceTransport(RestTemplate restTemplate,
      ConnectionConfig connectionConfig); void configureConnection(ConnectionConfig connectionConfig); @Override ClusterManagementRealizationResult submitMessage(
      T configMessage, CommandType command); @Override @SuppressWarnings("unchecked") ClusterManagementGetResult<T, R> submitMessageForGet(
      T config); @Override @SuppressWarnings("unchecked") ClusterManagementListResult<T, R> submitMessageForList(
      T config); @Override @SuppressWarnings("unchecked") ClusterManagementListOperationsResult<A, V> submitMessageForListOperation(
      A opType); @Override @SuppressWarnings("unchecked") ClusterManagementOperationResult<A, V> submitMessageForGetOperation(
      A op, String operationId); @Override @SuppressWarnings("unchecked") ClusterManagementOperationResult<A, V> submitMessageForStart(
      A op); @Override boolean isConnected(); @Override void close();  }
@Test public void submitMessageForListCallsRestTemplateExchange() { String opId = "opId"; String groupId = "groupId"; when(links.getList()).thenReturn("/operations"); doReturn(responseEntity).when(restTemplate).exchange(any(String.class), same(HttpMethod.GET), any(HttpEntity.class), same(ClusterManagementListResult.class), any(String.class), any(String.class)); when(configuration.getId()).thenReturn(opId); when(configuration.getGroup()).thenReturn(groupId); restServiceTransport.submitMessageForList(configuration); verify(restTemplate).exchange(eq("/v1/operations?id={id}&group={group}"), eq(HttpMethod.GET), any(HttpEntity.class), eq(ClusterManagementListResult.class), eq(opId), eq(groupId)); }