REST-116. Fix unclosed resources in tests.

issue: https://jira.kiji.org/browse/REST-116