add constraint deterministic capacity and junit