Josephson junctions as a prototype for synchronization of nonlinear oscillators