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/HostLocationCodec.java b/web/api/src/main/java/org/onosproject/codec/impl/HostLocationCodec.java
index 133a18b..3210408 100644
--- a/web/api/src/main/java/org/onosproject/codec/impl/HostLocationCodec.java
+++ b/web/api/src/main/java/org/onosproject/codec/impl/HostLocationCodec.java
@@ -26,7 +26,7 @@
 /**
  * Host JSON codec.
  */
-public class HostLocationCodec extends JsonCodec<HostLocation> {
+public final class HostLocationCodec extends JsonCodec<HostLocation> {
 
     @Override
     public ObjectNode encode(HostLocation hostLocation, CodecContext context) {