@Test
 public void canDoXorOperation() {
   viewModel.setOperation(Operation.XOR);
   initArraysForOperations();
   viewModel.doOperation();
   assertNotNull(viewModel.getResultBitArray());
 }
  @Test
  public void canDoOrOperation() {
    initArraysForOperations();

    viewModel.doOperation();

    assertNotNull(viewModel.getResultBitArray());
  }
  @Test
  public void doOperationAddsMessageToLog() {
    viewModel.setOperation(Operation.XOR);
    initArraysForOperations();

    viewModel.doOperation();

    assertFalse(viewModel.getLog().isEmpty());
  }
  @Test
  public void doOperationAddsMessageDidOperation() {
    viewModel.setOperation(Operation.XOR);
    initArraysForOperations();

    viewModel.doOperation();
    String message = viewModel.getLog().get(viewModel.getLog().size() - 1);

    assertTrue(message.matches(".*" + ViewModel.LogMessages.OPERATION_DID + ".*"));
  }