def METHOD_NAME(self):
    """ an unfederated file in a subfolder has the proper state after state changes """
    # resource should not have any files at this point
    self.assertEqual(self.res.files.all().count(), 0,
                     msg="resource file count didn't match")
    ResourceFile.create_folder(self.res, 'foo')
    # should succeed without errors
    check_irods_files(self.res, stop_on_error=True)
    # add one file to the resource
    hydroshare.add_resource_files(self.res.short_id, self.test_file_1, folder='foo')
    # should succeed without errors
    check_irods_files(self.res, stop_on_error=True)
    # resource should has only one file at this point
    self.assertEqual(self.res.files.all().count(), 1,
                     msg="resource file count didn't match")
    # get the handle of the file created above
    resfile = self.res.files.all()[0]
    # determine where that file should live
    fullpath = os.path.join(self.res.short_id, "data",
                            "contents", "foo", "file1.txt")
    self.assertEqual(resfile.file_folder, "foo")
    self.assertEqual(resfile.storage_path, fullpath)
    # now try to intentionally corrupt it
    resfile.set_short_path("fuzz.txt")
    # should raise exception
    with self.assertRaises(ValidationError):
        check_irods_files(self.res, stop_on_error=True)
    # now don't raise exception and read error
    errors, ecount, _, _ = check_irods_files(self.res, return_errors=True, log_errors=False)
    self.assertTrue(errors[0].endswith(
        'data/contents/fuzz.txt does not exist in iRODS'))
    self.assertTrue(errors[1].endswith(
        'data/contents/foo/file1.txt in iRODs does not exist in Django'))
    self.assertTrue(errors[2].endswith(
        "type is CompositeResource, title is 'My Test Resource'"))
    # now try to clean it up
    errors, ecount, _, _ = check_irods_files(self.res, return_errors=True, log_errors=False,
                                             clean_irods=True, clean_django=True)
    self.assertTrue(errors[0].endswith(
        'data/contents/fuzz.txt does not exist in iRODS (DELETED FROM DJANGO)'))
    self.assertTrue(errors[1].endswith(
        'data/contents/foo/file1.txt in iRODs does not exist in Django (DELETED FROM IRODS)'))
    self.assertTrue(errors[2].endswith(
        "type is CompositeResource, title is 'My Test Resource'"))
    # resource should not have any files at this point
    self.assertEqual(self.res.files.all().count(), 0,
                     msg="resource file count didn't match")
    # now check should succeed
    errors, ecount, _, _ = check_irods_files(self.res, stop_on_error=True, log_errors=False)
    self.assertEqual(ecount, 0)
    # delete resources to clean up
    hydroshare.delete_resource(self.res.short_id)