### Question:
CompositeCommand extends CommandBase { public void register(Command command) { registeredCommands.add(command); } CompositeCommand(Command... commands); void register(Command command); void unregister(Command command); @Override void execute(); @Override double getProgress(); @Override ReadOnlyDoubleProperty progressProperty();  }### Answer:
@Test public void register() throws Exception { CompositeCommand compositeCommand = new CompositeCommand(delegateCommand1); assertTrue(compositeCommand.isExecutable()); assertFalse(compositeCommand.isNotExecutable()); condition2.set(false); compositeCommand.register(delegateCommand2); assertFalse(compositeCommand.isExecutable()); assertTrue(compositeCommand.isNotExecutable()); compositeCommand.unregister(delegateCommand2); assertTrue(compositeCommand.isExecutable()); assertFalse(compositeCommand.isNotExecutable()); }