We demonstrate the Josephson effect in a serial double quantum dot defined in a nanowire with epitaxial superconducting leads. The supercurrent stability diagram adopts a honeycomb pattern with electron-hole and left-right reflection symmetry. We observe sharp discontinuities in the magnitude of the critical current, $I_c$, as a function of dot occupation, related to doublet to singlet ground state transitions. Detuning of the energy levels offers a tuning knob for $I_c$, which attains a maximum at zero detuning. The consistency between experiment and theory indicates that our device is a faithful realization of the two-impurity Anderson model.