@Test
public void testScriptOutput() {

    StringBuilder output = new StringBuilder();
    boolean success = AppleScript.execute("count {\"How\", \"many\", \"items\", \"in\", \"this\", \"list\"}", output);
    if(OsFamily.MAC_OS_X.isCurrent()) {
        // Assert that the script was executed successfully and that the output matches what is expected
        assert success;
        assert "6".equals(output.toString());
    }
    else {
        // We're not running Mac OS X, assert that execute returns false
        assert !success;
    }
}