def METHOD_NAME(get_fn):
    for tref in [md.load(get_fn('4waters.pdb')),  # no unit cell
                 md.load(get_fn('native2.pdb'))]:  # unit cell
        with GroTrajectoryFile(temp, 'w') as f:
            f.write(tref.xyz, tref.topology, unitcell_vectors=tref.unitcell_vectors)
        t = md.load(temp)
        eq(t.xyz, tref.xyz, decimal=3)
        eq(list(t.top.atoms), list(tref.top.atoms))
        eq(t.unitcell_vectors, tref.unitcell_vectors)
    #if there are 2 residues with same renum but different resname
    t = md.load(get_fn('two_residues_same_resnum.gro'))
    eq(t.n_residues, 2)