Make JSON codecs immutable

The contract for JSON codecs requires that they have no
local context.  Make them all immutable, and test that they
stay immutable.

Change-Id: Ia3930b844ede231940da05699f5f08605f946e0c
diff --git a/web/api/src/main/java/org/onosproject/codec/impl/IntentCodec.java b/web/api/src/main/java/org/onosproject/codec/impl/IntentCodec.java
index a03acfc..68a4eb1 100644
--- a/web/api/src/main/java/org/onosproject/codec/impl/IntentCodec.java
+++ b/web/api/src/main/java/org/onosproject/codec/impl/IntentCodec.java
@@ -28,7 +28,7 @@
 /**
  * Intent JSON codec.
  */
-public class IntentCodec extends JsonCodec<Intent> {
+public final class IntentCodec extends JsonCodec<Intent> {
 
     @Override
     public ObjectNode encode(Intent intent, CodecContext context) {