Bump to Silicon
[transportpce.git] / pce / src / test / java / org / opendaylight / transportpce / pce / service / PathComputationServiceImplTest.java
index 6bdc71a1f2cf048cade20b3e3bdecb58d704101f..86a2f9e075123269c73fb1aa05b6b6a5cb7c52f7 100644 (file)
@@ -12,7 +12,6 @@ import java.util.Map;
 import org.junit.After;
 import org.junit.Assert;
 import org.junit.Before;
-import org.junit.Ignore;
 import org.junit.Test;
 import org.mockito.Mockito;
 import org.opendaylight.mdsal.binding.api.DataBroker;
@@ -33,10 +32,11 @@ import org.opendaylight.yang.gen.v1.gnpy.path.rev200909.generic.path.properties.
 import org.opendaylight.yang.gen.v1.gnpy.path.rev200909.no.path.info.NoPathBuilder;
 import org.opendaylight.yang.gen.v1.gnpy.path.rev200909.result.Response;
 import org.opendaylight.yang.gen.v1.gnpy.path.rev200909.result.ResponseBuilder;
+import org.opendaylight.yang.gen.v1.gnpy.path.rev200909.result.ResponseKey;
 import org.opendaylight.yang.gen.v1.gnpy.path.rev200909.result.response.response.type.NoPathCaseBuilder;
 import org.opendaylight.yang.gen.v1.gnpy.path.rev200909.result.response.response.type.PathCaseBuilder;
+import org.opendaylight.yangtools.yang.common.Uint32;
 
-@Ignore
 public class PathComputationServiceImplTest extends AbstractTest {
 
     private PathComputationServiceImpl pathComputationServiceImpl;
@@ -67,7 +67,8 @@ public class PathComputationServiceImplTest extends AbstractTest {
 
     @Test
     public void testPathComputationRequestNoPath() {
-        Response response = new ResponseBuilder().setResponseType(new NoPathCaseBuilder()
+        Response response = new ResponseBuilder()
+                .withKey(new ResponseKey(Uint32.valueOf(1))).setResponseType(new NoPathCaseBuilder()
                 .setNoPath(new NoPathBuilder().setNoPath("no path").build()).build()).build();
 
         pathComputationServiceImpl.generateGnpyResponse(response,"path");
@@ -81,7 +82,8 @@ public class PathComputationServiceImplTest extends AbstractTest {
         PathMetric pathMetric = new PathMetricBuilder()
                 .setAccumulativeValue(new BigDecimal(21))
                 .setMetricType(PathBandwidth.class).build();
-        Response response = new ResponseBuilder().setResponseType(new PathCaseBuilder()
+        Response response = new ResponseBuilder()
+                .withKey(new ResponseKey(Uint32.valueOf(1))).setResponseType(new PathCaseBuilder()
                 .setPathProperties(new PathPropertiesBuilder().setPathMetric(Map.of(pathMetric.key(),pathMetric))
                 .build()).build()).build();