RESOURCE_ASSERT_STATE checks for asserting that a resource is in a given state