def _test_load_store_instrument(source_lsdsng, lsdinst_path, original_index):
    proj = load_lsdsng(source_lsdsng)
    proj.song.instruments.import_from_file(0x2a, lsdinst_path)

    target_instr = proj.song.instruments[0x2a]
    original_instr = proj.song.instruments[original_index]

    assert_equal(original_instr, target_instr)

    with temporary_file() as tmpfile:
        original_instr.export_to_file(tmpfile)

        with open(tmpfile, 'r') as fp:
            saved_inst = json.load(fp)

        with open(lsdinst_path, 'r') as fp:
            original_inst = json.load(fp)

        assert_equal(original_inst, saved_inst)