extract path pattern to unit test