Test that certificate is added correctly