Made sure that the return values are consistent and updated the tests

accordingly. Also added some extra tests to resource_tests.