}
private void retrieveMessages(ActorSystem system) throws Exception {
ActorRef service = getService(system);
Timeout timeout = new Timeout(Duration.create(2, TimeUnit.SECONDS));
Future<Object> fBets = Patterns.ask(service, new RetrieveBets(), timeout);
List<Bet> bets = (List<Bet>) Await.result(fBets, timeout.duration());
assert bets.size() == 200;
System.out.println("*** TESTING OK");
}