import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
-import com.google.common.base.Optional;
import com.google.common.collect.ImmutableList;
-import com.google.common.util.concurrent.CheckedFuture;
+import com.google.common.util.concurrent.FluentFuture;
import java.util.Collection;
+import java.util.Optional;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Executors;
import org.junit.Test;
}
public static NormalizedNode<?, ?> getRootNode(NormalizedNode<?, ?> moduleNode, SchemaContext schemaContext)
- throws ReadFailedException, ExecutionException, InterruptedException {
+ throws ExecutionException, InterruptedException {
try (InMemoryDOMDataStore store = new InMemoryDOMDataStore("test", Executors.newSingleThreadExecutor())) {
store.onGlobalContextUpdated(schemaContext);
DOMStoreReadTransaction readTransaction = store.newReadOnlyTransaction();
- CheckedFuture<Optional<NormalizedNode<?, ?>>, ReadFailedException> read = readTransaction
- .read(YangInstanceIdentifier.EMPTY);
+ FluentFuture<Optional<NormalizedNode<?, ?>>> read = readTransaction.read(YangInstanceIdentifier.EMPTY);
- Optional<NormalizedNode<?, ?>> nodeOptional = read.checkedGet();
+ Optional<NormalizedNode<?, ?>> nodeOptional = read.get();
return nodeOptional.get();
}