Restarting the MOM double encrypts the APM database password in APM CE (CEM). Afterwards the test connection will fail.