Former NAACP president Benjamin Jealous speaks at the Young Democrats convention in Lanham, Md. (Evelyn Hockstein/For The Washington Post)

Three prospective candidates for Maryland’s 2018 Democratic gubernatorial nomination test-marketed some of their messages Saturday for the state’s Young Democrats, combining attacks on Gov. Larry Hogan (R) with calls for the party to reclaim its voice as an advocate for the middle class.

Baltimore County Executive Kevin Kamenetz, former NAACP president Benjamin Jealous and State Sen. Richard S. Madaleno Jr. (Montgomery) all stopped short of formally declaring themselves candidates. But they left little doubt for the audience of about 100, attending the group’s annual convention at a conference room in Lanham, that they were edging closer to announcements.

Kamenetz and Madaleno offered up the most direct hits at Hogan. Kamenetz called him a champion of charter schools and vouchers while he underfunded public education. Referring to Hogan’s recent joint appearance in Montgomery County with Education Secretary Betsy DeVos, another charter and voucher advocate, he said: “It would be nice if Governor Hogan stood up to Secretary DeVos. But I’ve decided he is Secretary DeVos.”

Kamenetz, 52, a former Baltimore County Council member, also expressed scorn for Hogan’s decision to cancel Baltimore’s Red Line rail project — opting instead for an overhaul of the city’s bus system — and for budget cuts that he said turned the proposed Purple Line light rail between Bethesda and New Carrollton into “the Lavender Line.”

Madaleno, 51, called Hogan “Donald Trump in long form,” meaning he preferred Facebook to Trump’s obsessive tweeting.

“It takes a lot more to govern than a good press release and a nice press conference,” Madaleno said, adding that the state needed to focus on policies that provided economic security for those in their 20s rather than “old white men.”

Hogan spokesman Doug Mayer discounted the criticism as empty rhetoric. “In general, I would say that partisan politicians say partisan things. The governor is focused on what is best for Maryland.”

It was Jealous, who supported Sen. Bernie Sanders (I-Vt.) in the 2016 race for the Democratic presidential nomination, who ignited the group. With a commanding voice and the cadences of a preacher, he described an epiphany-like moment as he watched Sanders win over a conservative white audience in southwest Missouri, even as he spoke forcefully about criminal justice revisions needed to curb police violence against young black men.

Jealous, 44, said it was because Sanders had first spoken to the crowd about jobs and economic justice.

“It’s easy to say you’re the party of FDR and MLK and LBJ and talk about civil rights,” he said. “If you want to build the party, you have to be equally on fire about ending poverty.” He urged the young party members “to dig down deep and reach into hearts . . . and recognize we have way more in common than we have in differences.”

Several Young Democrats said they saw Jealous as the strongest potential opponent for Hogan.

Dominic McAlily, 26, president of the Baltimore Young Democrats (35 is the age limit) called Jealous “the icing on the cake.”

“If he does choose to run, I think he can fire up the base,” McAlily said.

“I never realized how in­cred­ibly good he was,” said Jereme Leazier, 32, a member of the Washington County Democratic Central Committee in rural western Maryland.

Each of the three said the party had lost its way in 2014 by not speaking to the middle class. Jealous said Hogan’s defeat of Lt. Gov. Anthony G. Brown was not about race (Brown is African American).

“That wasn’t about race; that was about a campaign. If we are at our best, we can beat Larry Hogan.”

Madaleno, the first openly gay man elected to the General Assembly, expressed wonder at the changes since his boyhood in Silver Spring, recalling when lawmakers legalized same-sex marriage in 2012.

“I never thought I’d be able to walk into the governor’s mansion and talk about marriage equality with my husband and two sons,” he said.

But Democrats stopped talking like Democrats in 2014 and 2016, he said, instead presenting themselves as Republicans who were a little nicer.

“We stopped talking about our convictions,” he said. “We didn’t give people a reason to show up [at the polls].”

Some other major names said to be considering a gubernatorial run were missing Saturday. Young Democrats of Maryland President Joseph Kitchen said Prince George’s County Executive Rushern L. Baker III did not respond to an invitation. Rep. John Delaney (D-Md.) was not available, Kitchen said.

Other possible candidates were not invited, because they had not reached what Kitchen called a “critical mass” of interest. These include Del. Maggie L. McIntosh (D-Baltimore), who is also looking at a campaign for state comptroller or governor, Baltimore attorney James L. Shea, and tech entrepreneur Alec Ross, an adviser to Hillary Clinton when she was secretary of state.

Despite showing some slippage in a recent Washington Post-University of Maryland poll, Hogan remains enormously popular as he enters his third year in office. He has also amassed more than $5 million for his reelection campaign.