The midterm elections are more than one year away. But in one week, two gubernatorial races will give us an early window on how both parties will do when a third of the Senate and all 435 House seats are up for election in 2018.

Elections in Virginia and New Jersey don't always foreshadow the midterm results. But you can find examples in which they have, dating back to at least 1993. That year, Virginia's George Allen and New Jersey's Christine Todd Whitman ran as tough-on-crime tax cutters who supported welfare reform and won. A year later, Republicans took control of both houses of Congress, including their first House majority in 40 years.

This year, Virginia has more of a potential to be a bellwether than New Jersey. It has become a battleground state at the presidential level, and control of the governorship has swung back and forth between the parties. And Virginia is the more competitive of the two contests this year.

Now, after months of being overshadowed by a series of special elections, the Virginia governor's race has finally taken center stage. And the battle for Richmond could offer a treasure trove of clues to 2018 and how it might unfold, far beyond anything revealed in the specials.

Those contests were held on thoroughly Republican turf, and with electorates that were politically, demographically, and geographically homogenous. The outcomes rested on only a few variables.

Virginia, on the other hand, is complicated. It's the perfect political petri dish for observing what might happen next year, in President Trump's first midterm.

The commonwealth of 8.4 million people (and growing) is a purple state. The outgoing governor, Terry McAuliffe, is a Democrat. The Republicans control the legislature — the General Assembly. The Democrats have won the last three presidential elections in Virginia, but they've had to work for it.

Statewide elections tend to be won and lost in the politically moderate, and increasingly Democratic, region of Northern Virginia. Voters there are consumed by suburban priorities: Improving public schools, maintaining public safety, and relieving the region's impossibly horrible highway traffic.

But other regions matter.

In the rural, conservative southwest, still dotted with coalfields, the global economy that has been a boon up north has left people behind. Voters there are after good paying jobs, affordable healthcare, and basic respect for their cultural and religious values.

In Hampton Roads, in the southeast, the economy is driven by a collection of major military bases, the population loaded with active-duty military and veterans. In central Virginia, the state capital of Richmond is a mix of a liberal government town and conservative suburbs.

Put together, the different Virginias offer an ethnically diverse population that is becoming less white every year, just like the rest of America. As of the last census, nearly a decade ago, the population was 69 percent white, 19 percent black, and the rest was Hispanic and Asian.

So, when voters here choose their next governor on Nov. 8, Democratic and Republican operatives keen on 2018 will study the results. Particularly the Trump factor.

"If I were the Democrats, I would be worried. I'd be very concerned," said Bruce Haynes, a GOP strategist. "They have a likable candidate, have outspent Republicans heavily, they have a president under 40 percent in any approval poll you can take, and the Republicans are on the cusp of winning this race in a very purple state."

Trump lost Virginia to Democratic nominee Hillary Clinton last year and never dug his way out. His approval ratings in the state align with his low national numbers.

The candidate opposite the party that controls the White House usually has an underlying advantage in the Virginia governor's race (granted, it didn't play out that way four years ago). Perhaps more significantly, Trump hasn't endeared himself to voters in Northern Virginia; in fact, quite the opposite.

That might explain why Ed Gillespie, the former lobbyist and longtime GOP insider, has kept a conspicuous distance from Trump, who has not ventured across the Potomac River to campaign for him. Instead, the Republican nominee has hosted Vice President Mike Pence, and soon, Sen. Marco Rubio of Florida. Ask Gillespie about Trump, and he can't change the subject fast enough.

Yet, Gillespie stands an even chance of defeating Lt. Gov. Ralph Northam, a Democrat. That's remarkable. It's also a problem for the Democratic Party.

Presidents are often a drag on members of their party in competitive House and Senate races in the midterm. If the outcome in Virginia suggests that Republicans are immune to this dynamic even amid the president's often-provocative rhetoric and Twitter rants, Democrats could be in deep trouble in 2018, or at least end up far less successful.

"How can anyone take seriously their claims of winning the majority" if they can't win in Virginia, asked one GOP operative who specializes in House races. That would also indicate that Republicans are primed in 2018 to turn out a fractious coalition of Trump voters and traditional Republicans despite the conflict between the president and the GOP establishment.

A Republican insider said turnout in and around Roanoke, a community heavy with Trump loyalists but not necessarily GOP stalwarts, could be prescient. "It's not just about Republican turnout, but people who voted for Trump; they're not like real Republicans," this individual said.

Indeed, among the biggest dangers Republicans face in 2018 is a base that is pleased with the president but dissatisfied with the GOP Congress. If these voters don't show up in the midterm, Democrats stand a better chance of winning seats.

"How are Democrats doing in exurbs? If we're able to increase or stay on par with turnout in Northern Virginia? Whether or not, in areas that favor Trump, there's any fatigue — whether they come out?" Democratic strategist Rodell Mollineau said, detailing the questions he hopes the Virginia race answers.

Northam isn't the most dynamic of candidates, and his campaign hasn't been much different.

It has followed the standard Democratic playbook: Convince voters that Gillespie equals Trump, with all of the implications that entails, and scare women voters into believing Gillespie will end abortion rights. Reluctantly, Northam joined minority voters in supporting the removal of Confederate statues that dot Virginia's landscape of public spaces.

If the lieutenant governor wins, it will be a structural victory credited to who is in the White House and the commonwealth's emergence this century as competitive but leaning liberal. That's why operatives on both sides of the aisle are keeping a close eye on Gillespie.

Even as Gillespie keeps Trump at arm's length, and publicly focuses on mundane, wonky white-paper pitches to grow the economy, improve public education, and upgrade transportation, he has gone all-in on the president's provocative law and order strategy with his campaign advertising.

Gillespie has run ads pledging to end the practice of "sanctuary cities" that harbor illegal immigrants from federal law enforcement and clean up gang violence. Like Trump, he has honed in on the threat from MS-13, a street gang and crime syndicate that is dominated by Hispanics, including some who are immigrants, both legal and illegal.

The message is jarringly at odds with the bland, business-like, and culturally and ethnically inclusive campaign Gillespie has otherwise run, not to mention the persona he has cultivated over years in the political arena. But if Gillespie can overcome Trump headwinds with this approach, Republicans looking to do the same next year mimic his strategy.

"What I'm monitoring most intently is that sanctuary city argument," said a Democratic operative who is watching Senate races, where Democrats are expected to be playing a lot of defense. "Republicans are hurting for things to talk about now, since they have unified control of the federal government and no major accomplishments. Sanctuary cities ads seem like the sort of thing they could run to gin up their base without necessarily offending swing voters."

New Jersey

While the Virginia gubernatorial contest is attracting most of the eyeballs ahead of Nov. 7, there will be a second statewide contest to replace New Jersey Gov. Chris Christie, who has fallen from a political superstar to a pariah during the past eight years.

Headlining the race is Democrat and former U.S. ambassador to Germany Phil Murphy, a onetime Goldman Sachs executive who has led from start to finish over Lt. Gov. Kim Guadagno, the two-term understudy to Christie, who has run a race largely focused on taxes and immigration.

For months, the race was mired in a state of apathy as voters within the state tuned it out until very recently as both campaigns and parties make their final pitches and put their get-out-the-vote operation into high gear. For Democrats, the main question centers around turnout and whether the state's party machinery comes out in force, particularly in suburban and city areas.

While Democrats have seen turnout spikes in special elections for multiple House seats, this will be the first example on a statewide level of how eager their base is to go to the polls. Turnout was not great for the June primary contest as only 13 percent of the state's 5.8 million registered voters casted ballots.

With one week to go, Democrats in the state are cautiously optimistic.

"It always concerns me," said Newark Mayor Ras Baraka of a potential low-turnout election. "I think it's the climate of the way things are. A lot of people are discouraged, a lot of feelings of hopelessness around the country."

"Where I am, we're going to rock the house," Baraka said. "Newark, Essex County — we're going to come out heavy for Phil Murphy. We're going to do our job."

Democrats have pulled out all the stops in order to get the vote out, particularly in the populous northern part of the states and in key areas. Former President Barack Obama and former Attorney General Eric Holder both made stops in Newark, while former President Bill Clinton stumped in Bergen County, a key swing county that borders the Hudson River.

Among the nearly 6 million registered voters in New Jersey, Democrats outnumber Republicans by more than 875,000. Due to the edge, Republicans are banking on making up ground among the 2.3 million registered independents, who outnumber Democrats by more than 200,000.

Last year, Hillary Clinton defeated Trump in the state by 14 points, and Trump's standing has only deteriorated since. That's why only the Democrats have tried to make Trump an issue in the race. As for the GOP, Trump has not publicly endorsed Guadagno, who did not vote for the president last year in the wake of the infamous "Access Hollywood" tape featuring lewd talk about women.

Although Murphy has been an outspoken critic of Trump and has raised national issues consistently, the race has largely centered on local issues. In particular, New Jersey's highest-in-the-nation property taxes have taken front and center. In both of their debates, Guadagno pushed the issue consistently, calling for a complete audit of the state government and pressing that New Jersey residents are being priced out of the state.

Additionally, Christie has become a burden Guadagno has found difficult to overcome. The former Republican rock star has seen his approval numbers in the state tank, including in a new Monmouth University poll, where only 22 percent approve of Christie's job performance while 75 percent disapprove.

"He's almost been like an anchor to her campaign," said Owen Henry, the Republican mayor of Old Bridge, with whom Guadagno campaigned recently. "It's not her fault."

For Guadagno, distancing herself from Christie has been a challenge. While Murphy has tried to tether her to the two-term governor, asking her "Where have you been?" repeatedly during debates and campaign events, Guadagno has simply tried to make the case that she isn't Christie.

"I don't think anyone mixes me up with Chris Christie," Guadagno told the Washington Examiner during a recent interview, adding that the comparison is "apples to oranges."

"We're two completely different kinds of people when they get to know me, and that's what I think you're seeing now in the poll numbers as they get closer," she said. "They see I'm not Chris Christie."

In certain instances, she's also tried to tie Murphy to the Republican governor, saying that he would have stood with Christie when he raised the state's gas tax by 23 cents per gallon in Oct. 2016. This was Christie's first move to raise taxes during his tenure. In the same vein, she's hammered away at Murphy's plan to raise taxes by more than $1 billion despite the high cost of living in the Garden State. Out of the 50 states and the District of Columbia, New Jersey ranks 43rd in cost of living. Guadagno knows that without the tax issue, the race would have been over and done with soon after the June Democratic primary.

"We wouldn't have had a race if he hadn't said he was going to raise our taxes $1 billion," Guadagno told a fundraiser hosted by the Morris County GOP. "He said it in September, and we've been cutting the difference ever since."

Some national issues have crept into the gubernatorial race, specifically immigration. In the wake of Trump's push to crack down on illegal immigration in May, Murphy called for New Jersey to become a sanctuary state — a comment Guadagno has seized on in recent weeks. She has called for a ban on sanctuary cities in the state.

If Guadagno's going to pull off a shocker, a few key areas are going to play pivotal roles. Ocean and Monmouth counties are the two most populous Republican areas in the state, and running up the score there like Christie did in 2009 and 2013 would go a long way. Additionally, Bergen and Burlington counties hold much of the swing vote in the state. Christie came close to winning Bergen in 2009 before carrying it handily in 2013. He also won Burlington in both contests.

"If Phil Murphy's winning big there on election night, that's trouble for any Republican," said Frank Luna, a New Jersey-based GOP strategist, referring to the swing districts.

Competing bellwethers

New Jersey might not be as much of a bellwether this year because of local issues and Christie's decline, but despite being a reliably blue state at the presidential level, it has foreshadowed the midterm congressional results in the past. Not only did Whitman win in 1993 before Republicans took control of Congress, followed by her re-election in 1997 a year before the GOP kept its majorities, but both of Christie's victories came before big years for Republicans nationally.

Christie was first elected in 2009, the year before the Tea Party wave in which Republicans recaptured the House. Fellow Republican Bob McDonnell won in Virginia that same year, ending eight years of Democrats holding the governorship. Christie was re-elected in 2013, ahead of another good year for the GOP in which Republicans finally won back the Senate after four years of trying.

Both Whitman and Christie were seen as rebukes to the incumbent Democratic presidents, as were Allen, Jim Gilmore, and McDonnell in Virginia. Similarly, the elections of Mark Warner and then Tim Kaine as governors of Virginia presaged Democratic gains in the state. Kaine's election came a year before Democrats won both houses of Congress, picking up 31 seats in the House alone.

Even the exceptions have often proved the rule. Republicans won Virginia's and New Jersey's governorships in 1997, but the party lost seats in Congress in 1998 (though they did keep their majorities). Yet, the impeachment saga played out in the intervening year, sapping some of the Republicans' electoral strength and helping President Bill Clinton rebound in popularity.

Similarly, Democratic wins in Virginia and New Jersey in 2001 were seen as reflecting poorly on then-President George W. Bush, but Republicans gained seats in Congress in the 2002 midterms. Over the course of that year, the national response to the 9/11 terrorist attacks became more of a divisive issue along partisan lines, to the benefit of Republicans who campaigned in support of Bush's war on terrorism.

This year, Democrats will look to both states to validate their view that the electorate is ready to reject Trump and the Republican congressional majorities. The GOP will eye the same races for insight into their ability to hang on to unified control of the federal government. And the voters will have a chance to draw their own conclusions.