Merge "Add enforceStateWithTests method"