Add unit tests for Resource dependency inference

Change-Id: Idd05c880913081dccfbcbb1f26a528705e5ec924
Merge "Add unit tests for Resource dependency inference"