A journalist claimed that she kept news of Kate Middleton's pregnancy with Prince George quiet in 2012 to avoid "crossing a line" as she testified for Associated Newspapers.