Added tests and started tiding ResultAdapter.php