Closes resources in test