Unit test for resource limit usage