double[] d = { 1.1, 2.2, 3.3 };
Vector m = new DenseVector(d);
Cluster model = new L1Model(5, m);
String format = model.asFormatString(null);
assertEquals("format", "l1m{n=0 c=[1.100, 2.200, 3.300]}", format);
String json = model.asJsonString();
GsonBuilder builder = new GsonBuilder();
builder.registerTypeAdapter(Model.class, new JsonModelAdapter());
Gson gson = builder.create();
L1Model model2 = gson.fromJson(json, MODEL_TYPE);
assertEquals("Json", format, model2.asFormatString(null));