Don't overwrite state and storage if already set. Unit-testing support