final Class<T> restClientClass, final ApplicationContext appContext) {
</BUG>
Obj.ensureInterface(restClientClass);
try {
return (T) restClientCache.get(restClientClass, new Callable<Object>() {
<BUG>@Override
public Object call() throws Exception {
</BUG>
return load(restClientClass, appContext);
}

import java.lang.reflect.Method;
import java.util.Collections;
import java.util.Map;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutionException;
@UtilityClass public class SpringRestClientFactory {
private Cache<Class, Object> restClientCache = CacheBuilder.newBuilder().build();
public <T> T getRestClient(final Class<T> restClientClass, final ApplicationContext appContext) {
Obj.ensureInterface(restClientClass);
try {
return (T) restClientCache.get(restClientClass, new Callable<Object>() {
@Override public Object call() throws Exception {
return load(restClientClass, appContext);
}
