Put the gammon hocks into a large pan. Add the apple juice, bay leaves, onion, thyme and peppercorns, then add cold water to cover. Bring to the boil, then turn down the heat and simmer for 2hr 30min–3hr, topping up the water as needed, until the hocks are tender and the meat is falling from the bone. Leave the hocks to cool in the liquid for about 1hr, then lift out (reserve the liquid).
Strain the liquid through a fine sieve into a clean pan and boil fiercely to reduce to about 500ml. Set aside. Lightly oil a 900g loaf tin and line with a couple of layers of cling film, making sure there is plenty hanging over the sides (to make removal easier).
Remove and discard the skin from the hocks and finely shred the meat – you should have about 700g. Discard any fatty or sinewy bits.
Put the hock into a bowl and mix in the parsley, mustard and capers. Spoon into the tin, pressing down. Chill.
Put the gelatine into a pan and cover with the cider. Leave to soak for 5min, then heat gently to dissolve the gelatine. Take off the heat, add the reduced cooking liquid and check the seasoning.
Slowly pour the liquid into the tin, allowing it to seep in until it’s just covering the meat (you may not need all of the liquid). Cover the tin with cling film (make sure it doesn’t touch the liquid) and chill overnight.
To serve, unwrap the cling film and invert the terrine on to a serving platter or board. Lift off the tin and peel off the cling film. Spoon some chutney or onion marmalade on top and decorate with caper berries, if using. Serve with melba toasts, if you like.