+
+ /**
+ * Test Action.
+ * Verify if Action schema node was found.
+ */
+ @Test
+ public void invokeActionTest() {
+ final InstanceIdentifierContext<?> result = ParserIdentifier
+ .toInstanceIdentifier(INVOKE_ACTION, this.schemaContext, Optional.empty());
+
+ // Action schema node
+ final QName actionQName = result.getSchemaNode().getQName();
+ assertEquals("https://example.com/ns/example-actions", actionQName.getModule().getNamespace().toString());
+ assertEquals("reset", actionQName.getLocalName());
+
+ // other fields
+ assertEquals(IdentifierCodec.deserialize(INVOKE_ACTION, schemaContext), result.getInstanceIdentifier());
+ assertNull(result.getMountPoint());
+ assertSame(this.schemaContext, result.getSchemaContext());
+ }
+
+ /**
+ * Test invoke Action on mount point.
+ * Verify if Action schema node was found.
+ */
+ @Test
+ public void invokeActionOnMountPointTest() {
+ final InstanceIdentifierContext<?> result = ParserIdentifier
+ .toInstanceIdentifier(MOUNT_POINT_IDENT + "/" + INVOKE_ACTION, this.schemaContext,
+ Optional.of(this.mountPointService));
+
+ // Action schema node
+ final QName actionQName = result.getSchemaNode().getQName();
+ assertEquals("https://example.com/ns/example-actions", actionQName.getModule().getNamespace().toString());
+ assertEquals("reset", actionQName.getLocalName());
+
+ // other fields
+ assertEquals(IdentifierCodec.deserialize(INVOKE_ACTION, schemaContext), result.getInstanceIdentifier());
+ assertEquals(this.mountPoint, result.getMountPoint());
+ assertEquals(this.schemaContextOnMountPoint, result.getSchemaContext());
+ }