If you do a check with the ifAllGranted parameter on the ifRole component, the test fails if you have any other implementation than SimpleGrantedAuthority. This is because the equals method in SimpleGrantedAuthority not checks on the getAuthority method but on equality of the implementation.
If you do a check with the ifAllGranted parameter on the ifRole component, the test fails if you have any other implementation than SimpleGrantedAuthority. This is because the equals method in SimpleGrantedAuthority not checks on the getAuthority method but on equality of the implementation.