Resource tests
TODO: unify data passing