Since California is the state with the highest state income tax, I assume they have the highest burden for proving you are no longer domiciled there. In fact they themselves point out that they are one of the few states to distinguish between residency and domicile.
From CA Publication 1031:
Meaning of Domicile
The term “domicile” has a special legal definition that is
not the same as residence. While many states consider
domicile and residence to be the same, California makes
a distinction and views them as two separate concepts,
even though they may often overlap. For instance, you
may be domiciled in California but not be a California
resident or you may be domiciled in another state but be
a California resident for income tax purposes.
Domicile is defined for tax purposes as the place
where you voluntarily establish yourself and family,
not merely for a special or limited purpose, but with a
present intention of making it your true, fixed, permanent
home and principal establishment. It is the place
where, whenever you are absent, you intend to return.
And among their requirement for changing domicile, they specifically call out that you must have an intention of living in the new state permanently or at least indefinitely:
Change of Domicile
You can have only one domicile at a time. Once you
acquire a domicile, you retain that domicile until you
A change of domicile requires all of the following:
- Abandonment of your prior domicile.
- Physically moving to and residing in the new locality.
- Intent to remain in the new locality permanently or
indefinitely as demonstrated by your actions.
Massachusetts has a similar set of guidelines for proving that you are no longer domiciled there:
A new domicile may be acquired only by:
- Abandoning the current domicile
- Establishing a residence at a new place, and
- Intending to make the new residence one's home permanently or for an indefinite
time, with no certain, present intention to return to the previous home.
- The burden of proving that a taxpayer has changed their domicile
lies with the party asserting the change.
Moving to another state for a month isn't going to be enough to prove that you are now domiciled there. You would have to cut your ties to your old state and most importantly make new ties to your new state. Ties to your new state might include but not be limited to sign a lease for 12+ months, get a drivers license, register to vote, join local community groups, etc. There are guides available on performing these steps to the satisfaction of local authorities, for instance this guide to becoming a Texan.
Neither California nor Massachusetts can't see into your mind and so with enough ties to your new state, I don't know how they'd prove you intended to leave the country all along, however in both cases above, the burden of proof is on you to prove that you are planning on living permanently or indefinitely in your new state and/or making it your home base.