def METHOD_NAME(app, capsys):
    with app.app_context():
        # Create submission with resources
        mock_import_old_record()
        capsys.readouterr()
        convert_and_store('1299143', 'original', True)
        captured_lines = capsys.readouterr().out.splitlines()
        assert(captured_lines[0] == 'Creating original conversion for ins1299143')
        assert(captured_lines[1].startswith("Creating archive at "))
        file_path = captured_lines[1].split()[-1]
        assert('/converted/' in file_path)
        assert(file_path.endswith("HEPData-ins1299143-v1.zip"))
        assert(captured_lines[2] == 'File created at %s' % file_path)
        assert(os.path.isfile(file_path))
        # Check contents of zip
        with zipfile.ZipFile(file_path) as zip:
            contents = zip.namelist()
            assert(len(contents) == 99)
            # Check for a sample of filenames from yaml and resources
            for f in ['submission.yaml', 'Table_1.yaml', 'figFigure7a.png']:
                assert(f in contents)
            # Check submission file has been updated with new resource location
            with zip.open('submission.yaml') as f:
                for line in f.readlines():
                    line_str = line.decode()
                    if 'location' in line_str:
                        assert('/resource/' not in line_str)