refactor assert resources.