Test tidy and destroy

Add tests for tidy in application container test.
Fix tidy scenarios in lifecycle tests.