public class TestDefaultCommandEngine {
public static final ActionId<DemoCommandObject> cType = new ActionId<DemoCommandObject>("c");
@Test
public void testeamesta() throws Exception {
DefaultActionDelegate engine = new TestActionDelegate();
final AtomicBoolean handled = new AtomicBoolean(false);
engine.addActionHandler(cType, new ActionHandler<DemoCommandObject>() {
@Override
public void handle(DemoCommandObject arg) {
handled.set(true);
}
});
engine.send(cType.create(new DemoCommandObject()));
assertTrue(handled.get());
}