Report HTTP status 409 on DATA_MISSING error
[netconf.git] / restconf / restconf-nb-bierman02 / src / test / java / org / opendaylight / controller / sal / restconf / impl / test / BrokerFacadeTest.java
index e5be1fa141a168bc7d7f77fb119a60e802ec09c4..9f7902fe13c23d57bcb7f13f4595700e2b027d4c 100644 (file)
@@ -270,21 +270,20 @@ public class BrokerFacadeTest {
     }
 
     /**
-     * Negative test of delete operation when data to delete does not exist. Error 404 should be returned.
+     * Negative test of delete operation when data to delete does not exist. Error DATA_MISSING should be returned.
      */
     @Test
     public void testCommitConfigurationDataDeleteNoData() throws Exception {
         // assume that data to delete does not exist
         prepareDataForDelete(false);
 
-        // try to delete and expect 404 error
+        // try to delete and expect DATA_MISSING error
         try {
             this.brokerFacade.commitConfigurationDataDelete(this.instanceID);
             fail("Delete operation should fail due to missing data");
         } catch (final RestconfDocumentedException e) {
             assertEquals(ErrorType.PROTOCOL, e.getErrors().get(0).getErrorType());
             assertEquals(ErrorTag.DATA_MISSING, e.getErrors().get(0).getErrorTag());
-            assertEquals(404, e.getErrors().get(0).getErrorTag().getStatusCode());
         }
     }