Use a physical name matching class in unit tests

This gives us the flexibility to change the format of the physical resource
name.

Change-Id: Ie36453345149291fe04d89b52d7966816e03cda6