ExecutorService serverExec = Executors.newSingleThreadExecutor();
serverExec.submit(server);
waitForState(server, ServerState.RUNNING);
PredictionModel model = new DenseModel(16777216, false);
model.configureClock();
MixClient client = null;
try {
client = new MixClient(MixEventName.average, "testSimpleScenario", "localhost:" + port, false, 2, model);
model.setUpdateHandler(client);
final Random rand = new Random(43);
for(int i = 0; i < 100000; i++) {
Integer feature = Integer.valueOf(rand.nextInt(100));
float weight = (float) rand.nextGaussian();
model.set(feature, new WeightValue(weight));
}
waitForMixed(model, 48000, 10000L);
int numMixed = model.getNumMixed();
//System.out.println("number of mix events: " + numMixed);
Assert.assertTrue("number of mix events: " + numMixed, numMixed > 0);
serverExec.shutdown();
} finally {