Rework PCEPDeserializerException and move it into SPI
[bgpcep.git] / pcep / spi / src / test / java / org / opendaylight / protocol / pcep / spi / APITest.java
similarity index 71%
rename from pcep/api/src/test/java/org/opendaylight/protocol/pcep/api/APITest.java
rename to pcep/spi/src/test/java/org/opendaylight/protocol/pcep/spi/APITest.java
index 62907a63755c600eb8f93cab758f79b4a6ac5720..9b45cf5c203d6713e6cc2cec58b8bd5533f692a8 100644 (file)
@@ -5,23 +5,22 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-package org.opendaylight.protocol.pcep.api;
+package org.opendaylight.protocol.pcep.spi;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
 
 import org.junit.Test;
-import org.opendaylight.protocol.pcep.PCEPDeserializerException;
 
 public class APITest {
 
        @Test
        public void testDeserializerException() {
                final PCEPDeserializerException e = new PCEPDeserializerException("Some error message.");
-               assertEquals("Some error message.", e.getErrorMessage());
+               assertEquals("Some error message.", e.getMessage());
 
-               final PCEPDeserializerException e1 = new PCEPDeserializerException(new IllegalArgumentException(), "Some error message.");
-               assertEquals("Some error message.", e1.getErrorMessage());
+               final PCEPDeserializerException e1 = new PCEPDeserializerException("Some error message.", new IllegalArgumentException());
+               assertEquals("Some error message.", e1.getMessage());
                assertTrue(e1.getCause() instanceof IllegalArgumentException);
        }
 }