Updated test_inverse to include unit check