// the dataline has all its attributes set to 1d
DataLine dl = EasyMock.createMock(DataLine.class);
EasyMock.expect(dl.getAttribut(EasyMock.anyInt())).andReturn(1d).atLeastOnce();
EasyMock.replay(dl);
Random rng = new MersenneTwisterRNG();
for (int nloop = 0; nloop < n; nloop++) {
mock.categoricalDataset();
// all weights are 1 (active)
CDRule rule = new CDRule(0.);
for (int condInd = 0; condInd < rule.getNbConditions(); condInd++) {
rule.setW(condInd, 1.);
rule.setO(condInd, rng.nextBoolean());
rule.setV(condInd, rng.nextInt(2)); // two categories
}
// the condition is true if the operator is == and the values are equal
// (value==1), or the operator is != and the values are no equal
// (value==0)