/**
* Test method for {@link org.apache.felix.useradmin.impl.role.UserImpl#hasCredential(java.lang.String, java.lang.Object)}.
*/
public void testHasExistingCredentialAlternativeValueTypeOk() {
UserImpl user = new UserImpl("foo");
Dictionary dict = user.getCredentials();
dict.put("password", "secret");
// Direct comparison...
assertTrue(user.hasCredential("password", "secret"));
// In case the given value is a byte[]...
assertTrue(user.hasCredential("password", "secret".getBytes()));
dict.put("password", "otherSecret".getBytes());
// Direct comparison...
assertTrue(user.hasCredential("password", "otherSecret".getBytes()));
// In case the stored value is a byte[]...
assertTrue(user.hasCredential("password", "otherSecret"));
}