A federal judge blasted the Palm Beach County Sheriff's Office Wednesday, over its investigation of a deputy-involved shooting.

"This investigation from beginning to end has been slipshod and shoddy, it's a disgrace," U.S. District Court Judge Daniel Hurley said before testimony began Wednesday.

Seth Adams was shot and killed by deputy Michael Custer on May 17, 2012, outside of his family’s nursery in Loxahatchee.

The Adams family is suing the deputy, claiming Custer used unjustified and excessive force.

Custer, who said he was working an unrelated undercover surveillance operation in the area at the time, has always maintained that Adams was hostile and aggressive and that he only shot Adams when he feared Adams was reaching for a gun.

Judge Hurley went after the lead detective, Christopher Neumann, for his testimony earlier in the case.

On the stand, Neumann testified he could not reconcile discrepancies in Custer's account of killing Adams, that "it was not my job."

Judge Hurley said he had "never in his life heard an investigator utter statements like that."

Detective Neumann sent the case to the Palm Beach County State Attorney's office, which later declined to press criminal charges, with no mention of those inconsistencies.

Hurley on PBSO investigation into shooting: "What was done here was simply shocking." "Just a host of things not done." "A disgrace" @WPTV — Sam Smink (@samsminkWPTV) March 8, 2017

Judge Hurley said these facts "were simply shocking," and that "the community has a right to know an investigation is done properly."

Judge Hurley blasted the Palm Beach County Sheriff's Office for also failing to measure the distance between Custer's and Adams' vehicles the night of the shooting, calling it "unbelievable."

He also questioned why investigators, during Custer's taped re-enactment of the shooting, did not have Custer recreate the shooting by a truck, similar to Seth's, or even place a gun in his hand to demonstrate. That, plus the failure of the sheriff’s office to take certain items into evidence, was something Hurley said "was remarkable."

Judge Hurley's scolding came after the defense asked for permission to introduce a 40-minute video they had just made on Feb. 17, after the trial had already started.

The defense said the video, filmed on the shooting range, showed Custer demonstrating how he could hold his gun in various ways, and where the shell casings were ejected each time.

Attorneys for the Adams' family objected, saying the defense "was attempting to create evidence," and they had only been made aware of the tape Tuesday night.

Judge Hurley called the tape, "a flagrant violation of discovery rules," saying the rules are in place to prevent someone from being sandbagged.

The judge said the video was evidence, not just demonstrative as the defense argued, and said the jury was not allowed to see it.

After the outburst, Sergeant Michael Custer took the stand, telling the jury he had been with PBSO since April 1988. His attorney, Summer Barranco, spent at least an hour having Custer describe the levels of resistance an officer can see in the field, and how officers are trained to react and what kind of force they are allowed to use.

Custer testified that the first words out of Seth Adams' mouth that night were aggressive, leading Custer to believe this would not be a situation of low-level resistance.

Custer claims Seth Adams choked him, which meant "at that point, this became a deadly-force encounter."

While on the stand, Custer did not tell us anything he hadn't told investigators before, but what was unnerving and alarming to some, was the fact he demonstrated his version of the shooting, shouting and all.

Custer testified he shot Adams because at one point, after the alleged choking, Adams went back to his truck, and may have grabbed a weapon.

Custer called it "the most terrifying moment of my life."

Custer spent the whole day on the stand and the Adams attorneys were just starting their cross examination when court ended.

Attorneys for the Adams say physical evidence shows Custer's version of events is not true.

They questioned Custer about being on the Adams's private property that night. He said he did not know anyone lived there. Radio transmissions played back to him proved that wasn't true.

The attorneys continued questioning Custer about what type of non-lethal force he could have used that night.

Custer will continue testifying Thursday.