Although this is a very unlikely scenario, the issue can be caused by the format of the encrypted password string.
The following error message might be logged in oracle.log after the query is tested:
oracle: (nimDecrypt) detecting mode from decoded string failed.
oracle: Profile: test query profile, Oracle error! Status: -1, - ORA-01005: null password given; logon denied