@Test
public void testMajorityLearner() throws Exception {
MajorityLearner learner = new MajorityLearner();
DataSet ds = DataSetFactory.getRestaurantDataSet();
learner.train(ds);
int[] result = learner.test(ds);
Assert.assertEquals(6, result[0]);
Assert.assertEquals(6, result[1]);
}
@Test