We were unit testing a piece of code where the getUsername() in CfCredentials.class is getting called. In case of null in username/password we put a custom Exception to be thrown, later in code depending upon the return value of getUsername() or getPassword(). However, assertion failed as it was a NPE instead! A null-check before accessing toString() on the map data helps.
We were unit testing a piece of code where the getUsername() in CfCredentials.class is getting called. In case of null in username/password we put a custom Exception to be thrown, later in code depending upon the return value of getUsername() or getPassword(). However, assertion failed as it was a NPE instead! A null-check before accessing toString() on the map data helps.