@Test
public void testLearn() throws Exception {

           List<Data> dataset = new ArrayList<Data>();
           
           ICsvListReader listReader = new CsvListReader(
                   new FileReader("src/test/resources/golf.csv"), 
                   CsvPreference.EXCEL_NORTH_EUROPE_PREFERENCE);
           
           listReader.getHeader(true);
           
           List<String> list;
           while( (list = listReader.read()) != null ) {
               Data data = new DataImpl();
               data.put("outlook", list.get(0));
               data.put("temperature", Integer.parseInt(list.get(1)));
               data.put("humidity", Integer.parseInt(list.get(2)));
               data.put("wind", Boolean.parseBoolean(list.get(3)));
               data.put("play", list.get(4));
               
               dataset.add(data);
           }
	
           NaiveBayes nb = new NaiveBayes();
           nb.setLabelAttribute( "play" );
           
           
           for (Data data : dataset) {
               nb.learn( data );
           }
           Data test = new DataImpl();
           test.put( "outlook", "sunny" );
           test.put( "temperature", "cool" );
           test.put( "humidity", "high" );
           test.put( "windy", "TRUE" );
           String prediction = nb.predict( test );
           log.info( "item is: {}", test );
           log.info( "Prediction is: {}", prediction );
           test.put( "outlook", "overcast" );
           test.put( "temperature", "mild" );
           test.put( "humidity", "normal" );
           test.put( "windy", "FALSE" );
           prediction = nb.predict( test );
           log.info( "item is: {}", test );
           log.info( "Prediction is: {}", prediction );
           //  Ein Trainingsbeispiel:  "overcast";"hot";"normal";"FALSE";"yes"
           test.put( "outlook", "overcast" );
           test.put( "temperature", "hot" );
           test.put( "humidity", "normal" );
           test.put( "windy", "FALSE" );
           prediction = nb.predict( test );
           log.info( "item is: {}", test );
           log.info( "Prediction is: {}", prediction );
           Assert.assertEquals( "yes", prediction );
}