Britney Spears is "very optimistic" that she'll get her sons back as she completes the judge's checklist, the singer's close friend Sam Lufti tells PEOPLE.
Lufti, whom Kevin Federline's camp attempted to subpoena in the ongoing custody battle, reminded PEOPLE in an e-mail that Federline getting custody is "temporary."
"We ... signed all the necessary documents that she needed to get done," he said. Spears, he added, is "in a good mood, no problems, very optimistic."
Monday a judge granted Federline physical custody of Sean Preston, 2, and Jayden James, 1, "until further order of the court." Lufti told PEOPLE that what led to the ruling was just a misunderstanding.
"Scheduling conflicts and errors in communication led her to believe that her deadline was later this week rather than [Monday]," Lufti said. "However, once we finally realized what was going on, we completed the list of tasks. ...So everything's looking good."
At least one of the judge's requirements, however, remains unfulfilled.
Spears, facing a misdemeanor charge of driving without a valid license, went to the Department of Motor Vehicles on Monday to get a California license to replace her Louisiana card, but DMV spokesperson Jan Mendoza says Spears hasn't yet finished the application process.
"As of now, she's not legally able to drive in California," says Mendoza.
"Britney Spears is still unlicensed," Mendoza adds. "She does have a pending application. She's very close to getting a California license."
Another hearing in the custody case is set for Wednesday.