Add test for Compute resource class and fix bugs found during testing