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