  We consider a long topological Josephson junction formed on a conducting 2D
surface of a 3D topological insulator (TI). The superconducting correlations
are proximity-induced by s-wave superconductors covering the surface. The 1D
spacing between the coverings is either unfilled or filled by a magnetic
insulator. Generally, the Josephson current mediated by the TI surface is
determined by scattering modes as well as by the states localized around the
junction (Andreev bound states or Andreev bands). We find out that it is
crucial to take into account both contributions to determine the current--phase
relation of the topological Josephson junction. We analyze the dependence of
the Josephson current on the thickness of the junction as well as the
deviations from the sinusoidal shape of the current--phase relation.
