@Test
public void testTrivialCasesWithOneComponent() {

    Vector mean = VectorUtils.of(1., 2.);
    DenseMatrix covariance = MatrixUtil.fromList(Arrays.asList(
        VectorUtils.of(1, -0.5),
        VectorUtils.of(-0.5, 1)),
        true
    );
    GmmModel gmm = new GmmModel(
        VectorUtils.of(1.0),
        Collections.singletonList(new MultivariateGaussianDistribution(mean, covariance))
    );
    Assert.assertEquals(2, gmm.dimension());
    Assert.assertEquals(1, gmm.countOfComponents());
    Assert.assertEquals(VectorUtils.of(1.), gmm.componentsProbs());
    Assert.assertEquals(0., gmm.predict(mean), 0.01);
    Assert.assertEquals(1, gmm.likelihood(mean).size());
    Assert.assertEquals(0.183, gmm.likelihood(mean).get(0), 0.01);
    Assert.assertEquals(0.183, gmm.prob(mean), 0.01);
}