diff --git a/src/main/java/net/onrc/onos/intent/runtime/PathCalcRuntime.java b/src/main/java/net/onrc/onos/intent/runtime/PathCalcRuntime.java
index 95c63c8..5600e0c 100644
--- a/src/main/java/net/onrc/onos/intent/runtime/PathCalcRuntime.java
+++ b/src/main/java/net/onrc/onos/intent/runtime/PathCalcRuntime.java
@@ -16,11 +16,15 @@
 import net.onrc.onos.ofcontroller.networkgraph.Path;
 import net.onrc.onos.ofcontroller.networkgraph.Switch;
 
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 /**
  * @author Toshio Koide (t-koide@onlab.us)
  */
 public class PathCalcRuntime implements IFloodlightService {
 	private NetworkGraph graph;
+	private final static Logger log = LoggerFactory.getLogger(PathCalcRuntime.class);
 	public PathCalcRuntime(NetworkGraph g) {
 		this.graph = g;
 	}
@@ -39,7 +43,7 @@
 			switch (intentOp.operator) {
 			case ADD:
 				if (!(intentOp.intent instanceof ShortestPathIntent)) {
-					// unsupported intent type.
+					log.error("unsupported intent type: {}", intentOp.intent.getClass().getName());
 					// TODO should push back the intent to caller
 					continue;
 				}
@@ -48,7 +52,9 @@
 				Switch srcSwitch = graph.getSwitch(spIntent.getSrcSwitchDpid());
 				Switch dstSwitch = graph.getSwitch(spIntent.getDstSwitchDpid());
 				if (srcSwitch == null || dstSwitch == null) {
-					// incomplete intent.
+					log.error("Switch not found: {}, {}",
+							spIntent.getSrcSwitchDpid(),
+							spIntent.getDstSwitchDpid());
 					// TODO should push back the intent to caller
 					continue;
 				}
@@ -68,7 +74,7 @@
 				}
 				Path path = tree.getPath(dstSwitch);
 				if (path == null) {
-					// path not found.
+					log.error("Path not found: {}", intentOp.intent.toString());
 					// TODO should push back the intent to caller
 					continue;
 				}
diff --git a/src/main/java/net/onrc/onos/ofcontroller/util/serializers/KryoFactory.java b/src/main/java/net/onrc/onos/ofcontroller/util/serializers/KryoFactory.java
index 7ddf5d8..f65a830 100644
--- a/src/main/java/net/onrc/onos/ofcontroller/util/serializers/KryoFactory.java
+++ b/src/main/java/net/onrc/onos/ofcontroller/util/serializers/KryoFactory.java
@@ -178,6 +178,7 @@
 	kryo.register(IntentOperationList.class);
 	kryo.register(IntentOperation.class);
 	kryo.register(PathIntent.class);
+	kryo.register(Intent.class);
 	kryo.register(ShortestPathIntent.class);
 	kryo.register(ConstrainedShortestPathIntent.class);
 	kryo.register(Intent.IntentState.class);
diff --git a/src/test/java/net/onrc/onos/intent/IntentOperationListTest.java b/src/test/java/net/onrc/onos/intent/IntentOperationListTest.java
new file mode 100644
index 0000000..ad5315b
--- /dev/null
+++ b/src/test/java/net/onrc/onos/intent/IntentOperationListTest.java
@@ -0,0 +1,67 @@
+package net.onrc.onos.intent;
+
+import static org.junit.Assert.assertEquals;
+import net.onrc.onos.ofcontroller.networkgraph.LinkEvent;
+import net.onrc.onos.ofcontroller.networkgraph.Path;
+import net.onrc.onos.ofcontroller.util.serializers.KryoFactory;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+import com.esotericsoftware.kryo.Kryo;
+import com.esotericsoftware.kryo.io.Input;
+import com.esotericsoftware.kryo.io.Output;
+
+public class IntentOperationListTest {
+
+	@Before
+	public void setUp() throws Exception {
+	}
+
+	@After
+	public void tearDown() throws Exception {
+	}
+
+	@Test
+	public void test() {
+		IntentOperationList opList = new IntentOperationList();
+
+		ConstrainedShortestPathIntent cspIntent1 =
+				new ConstrainedShortestPathIntent("1", 2L, 3L, 4L, 5L, 6L, 7L, 1000.0);
+
+		Path path = new Path();
+		path.add(new LinkEvent(1L, 2L, 3L, 4L));
+		path.add(new LinkEvent(5L, 6L, 7L, 8L));
+		path.add(new LinkEvent(9L, 0L, 1L, 2L));
+
+		PathIntent pathIntent1 = new PathIntent("11", path, 123.45, cspIntent1);
+		opList.add(IntentOperation.Operator.ADD, pathIntent1);
+		opList.add(IntentOperation.Operator.REMOVE, new Intent("22"));
+
+		KryoFactory factory = new KryoFactory();
+		Kryo kryo = factory.newKryo();
+		Output output = new Output(1024);
+		kryo.writeObject(output, opList);
+		output.close();
+
+		byte[] bytes = output.toBytes();
+
+		Input input = new Input(bytes);
+		IntentOperationList rcvOpList = kryo.readObject(input, IntentOperationList.class);
+
+		assertEquals(2, rcvOpList.size());
+
+		IntentOperation op1 = rcvOpList.get(0);
+		IntentOperation op2 = rcvOpList.get(1);
+
+		assertEquals(IntentOperation.Operator.ADD, op1.operator);
+		PathIntent intent1 = (PathIntent) op1.intent;
+		assertEquals("11", intent1.getId());
+		assertEquals(3, intent1.getPath().size());
+
+		assertEquals(IntentOperation.Operator.REMOVE, op2.operator);
+		Intent intent2 = op2.intent;
+		assertEquals("22", intent2.getId());
+	}
+}
