def METHOD_NAME(get_fn):
    def _test_atom_group(t, value):
        sasa = md.shrake_rupley(t, mode='atom')
        rids = np.array([a.residue.index for a in t.top.atoms])
        for i, rid in enumerate(np.unique(rids)):
            mask = (rids == rid)
            eq(value[:, i], np.sum(sasa[:, mask], axis=1))
    t = md.load(get_fn('frame0.h5'))
    value = md.shrake_rupley(t, mode='residue')
    assert value.shape == (t.n_frames, t.n_residues)
    _test_atom_group(t, value)
    # scramle the order of the atoms, and which residue each is a
    # member of
    df, bonds = t.top.to_dataframe()
    df['resSeq'] = np.random.permutation(df['resSeq'])
    df['resName'] = df['resSeq']
    t.top = md.Topology.from_dataframe(df, bonds)
    value = md.shrake_rupley(t, mode='residue')
    _test_atom_group(t, value)