Tests for file method.