improved test resource provider creation for more flexibility