summaryrefslogtreecommitdiffstats
path: root/acl
diff options
context:
space:
mode:
Diffstat (limited to 'acl')
-rw-r--r--acl/acl-impl/src/test/java/io/fd/hc2vpp/acl/AclModuleTest.java29
1 files changed, 16 insertions, 13 deletions
diff --git a/acl/acl-impl/src/test/java/io/fd/hc2vpp/acl/AclModuleTest.java b/acl/acl-impl/src/test/java/io/fd/hc2vpp/acl/AclModuleTest.java
index 671cd283c..f2c47f7b5 100644
--- a/acl/acl-impl/src/test/java/io/fd/hc2vpp/acl/AclModuleTest.java
+++ b/acl/acl-impl/src/test/java/io/fd/hc2vpp/acl/AclModuleTest.java
@@ -16,14 +16,6 @@
package io.fd.hc2vpp.acl;
-import static org.hamcrest.CoreMatchers.is;
-import static org.hamcrest.CoreMatchers.not;
-import static org.hamcrest.Matchers.empty;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertThat;
-import static org.mockito.Mockito.mock;
-import static org.mockito.MockitoAnnotations.initMocks;
-
import com.google.inject.Guice;
import com.google.inject.Inject;
import com.google.inject.Provider;
@@ -32,14 +24,14 @@ import com.google.inject.name.Named;
import com.google.inject.testing.fieldbinder.Bind;
import com.google.inject.testing.fieldbinder.BoundFieldModule;
import io.fd.hc2vpp.common.translate.util.NamingContext;
+import io.fd.honeycomb.translate.impl.read.GenericListReader;
import io.fd.honeycomb.translate.impl.read.registry.CompositeReaderRegistryBuilder;
import io.fd.honeycomb.translate.impl.write.registry.FlatWriterRegistryBuilder;
import io.fd.honeycomb.translate.read.ReaderFactory;
+import io.fd.honeycomb.translate.spi.read.ListReaderCustomizer;
import io.fd.honeycomb.translate.write.WriterFactory;
import io.fd.vpp.jvpp.JVppRegistry;
import io.fd.vpp.jvpp.acl.future.FutureJVppAclFacade;
-import java.util.HashSet;
-import java.util.Set;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mock;
@@ -47,9 +39,19 @@ import org.opendaylight.controller.md.sal.binding.api.DataBroker;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.InterfacesState;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.InterfacesStateBuilder;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.Interface;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.InterfaceBuilder;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
+import java.util.HashSet;
+import java.util.Set;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.not;
+import static org.hamcrest.Matchers.empty;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertThat;
+import static org.mockito.Mockito.mock;
+import static org.mockito.MockitoAnnotations.initMocks;
+
public class AclModuleTest {
@@ -88,8 +90,9 @@ public class AclModuleTest {
.addBinding().toInstance(registry -> {
registry.addStructuralReader(InstanceIdentifier.create(InterfacesState.class),
InterfacesStateBuilder.class);
- registry.addStructuralReader(InstanceIdentifier.create(InterfacesState.class).child(Interface.class),
- InterfaceBuilder.class);
+ registry.add(new GenericListReader<>(InstanceIdentifier.create(InterfacesState.class)
+ .child(Interface.class),
+ mock(ListReaderCustomizer.class)));
}), new AclModule(MockJVppAclProvider.class), BoundFieldModule.of(this)).injectMembers(this);
}