Refactor ExploreTest and FileTest