use of org.springframework.cloud.client.loadbalancer.LoadBalancerRequest in project spring-cloud-netflix by spring-cloud.
the class RibbonLoadBalancerClientTests method testExecute.
@Test
public void testExecute() throws IOException {
final RibbonServer server = getRibbonServer();
RibbonLoadBalancerClient client = getRibbonLoadBalancerClient(server);
final String returnVal = "myval";
Object actualReturn = client.execute(server.getServiceId(), (LoadBalancerRequest<Object>) instance -> {
assertServiceInstance(server, instance);
return returnVal;
});
verifyServerStats();
assertEquals("retVal was wrong", returnVal, actualReturn);
}
Aggregations