Britney Spears had to battle the paparazzi on her arrival at a Los Angeles courthouse on Friday (October 26). The singer, whose car was swarmed as she attempted to pull into a service entrance at the courthouse, is fighting a court battle with ex-husband Kevin Federline over custody of their two young sons. Lawyers for the pop singer and her ex-husband Kevin Federline were in a Los Angeles court to argue over whether the two have complied with court orders over parenting and, in Spears' case, random drug testing. Spears, 25, and Federline, 29, split a year ago and for months have waged a custody war over Sean Preston, 2, and Jayden James, 1, as Spears' life slipped out of control. The pop diva, who rose to stardom on the Disney Channel, has spent time in drug and alcohol rehab, clashed with paparazzi and become the fodder for numerous jokes after being photographed in public without wearing underwear. She arrived to court Friday (October 27) and was held up by photographers and cameramen. On Thursday, a judge dismissed an automobile hit-and-run case against her after she settled with the owner of the car she hit, and she pleaded not guilty to a lesser charge of driving without a license. But her singing career appears to be rebounding with a recent single, "Gimme More," that is topping digital download charts, and a new album "Blackout," set for release Oct. 30. Still, family Court Commissioner Scott Gordon in recent weeks has yanked visitation rights from Spears only to reinstate them after she complied with his rulings. Gordon has ordered both parents to seek counseling and hire a parenting coach. He has told Spears she must submit to random drug testing twice a week.