ISPN-3951 Make sure TestingUtil.replaceComponent is only called after
mock is fully configured

* Changed tests to make sure the replaced component is configured first