Well it is not only about testing the distance in your training. More important is to find the right pace, the perfect rythm for YOU in a longer race. When I prepared Olympic top swimmers for 1500m we always focused on rythm and pace and YOU should do that too. This is the key to success. With the right training you can do it. here is an example of a training session:
Distance pacing
300m warm up change stroke every 50m, kick every 3rd 25m
8 x 50m freestyle, second 25m “touch armpit” freestyle rest 15”
4 x 100m pull breathing every 7th stroke rest 20”-30”
500m – 5 x 100m – 10 x 50m freestyle 1-5 rest 45” and 20”
200m easy breaststroke and backstroke
300m – 2 x 150m – 3 x 100m- 4 x 75m - 6 x 50m freestyle pull rest 45”-25”
300m easy kicking freestyle and butterfly