Example usage for org.apache.commons.lang3.mutable MutableBoolean toBoolean

List of usage examples for org.apache.commons.lang3.mutable MutableBoolean toBoolean

Introduction

In this page you can find the example usage for org.apache.commons.lang3.mutable MutableBoolean toBoolean.

Prototype

public Boolean toBoolean() 

Source Link

Document

Gets this mutable as an instance of Boolean.

Usage

From source file:org.sejda.cli.CommandLineTestBuilder.java

public void assertTaskCompletes(String commandLine) {
    final MutableBoolean taskCompleted = new MutableBoolean(false);
    GlobalNotificationContext.getContext().addListener(new EventListener<TaskExecutionCompletedEvent>() {

        @Override//from   w ww .  ja v  a 2 s  .  c o m
        public void onEvent(TaskExecutionCompletedEvent event) {
            taskCompleted.setValue(true);
        }

    });

    String consoleOutput = invokeConsoleAndReturnSystemOut(commandLine);
    assertThat("Task did not complete. Console output was:\n" + consoleOutput, taskCompleted.toBoolean(),
            is(true));
}