def METHOD_NAME(snapshot_factory, simulation_factory,
                             special_pair_cls, params, r_cut, force, energy):
    snapshot = snapshot_factory()
    sim = simulation_factory(snapshot)
    potential = special_pair_cls()
    potential.params['A-A'] = params
    potential.r_cut['A-A'] = r_cut
    sim.operations.integrator = hoomd.md.Integrator(dt=0.005,
                                                    forces=[potential])
    sim.run(0)
    sim_energies = potential.energies
    sim_forces = potential.forces
    if sim.device.communicator.rank == 0:
        assert sum(sim_energies) == pytest.approx(energy)
        numpy.testing.assert_allclose(sim_forces[0], [force, 0.0, 0.0],
                                      rtol=1e-6,
                                      atol=1e-5)
        numpy.testing.assert_allclose(sim_forces[1], [-1 * force, 0.0, 0.0],
                                      rtol=1e-6,
                                      atol=1e-5)