All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.sphere.sdk.client.SphereRequestExecutorTestDouble Maven / Gradle / Ivy

There is a newer version: 1.0.0-M12
Show newest version
package io.sphere.sdk.client;

import io.sphere.sdk.http.ClientRequest;

import java.util.concurrent.CompletableFuture;

public abstract class SphereRequestExecutorTestDouble implements SphereRequestExecutor {

    @Override
    public  CompletableFuture execute(final ClientRequest clientRequest) {
        return CompletableFuture.completedFuture(result(clientRequest));
    }

    protected   T result(@SuppressWarnings("unused") final ClientRequest requestable) {
        throw new UnsupportedOperationException("override the " + SphereRequestExecutorTestDouble.class.getName() +
                ".result(final ClientRequest requestable) method to return a value.");
    }

    @Override
    public void close() {
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy