Added tests and updated ResultAdapter.php