added switch to deactivate lifecycle check and made improvements to
Junit tests