@SuppressWarnings("unchecked") // hopefully correct
    @Override
    public <T> Codec<T> get(Class<T> clazz) {
      if (!Somebody.class.isAssignableFrom(clazz)) {
        throw new CodecConfigurationException("Not supported " + clazz);
      }
      return (Codec<T>) this;
    }
Manually reads and writes all attributes
mongo/test/org/immutables/mongo/fixture/BsonCodecRepoTest.java