Code example for UnsupportedEncodingException

Methods: getMessage

0
assertEquals("User Data should be length 2, username, password", e.getMessage());
        } 
        catch (UnsupportedEncodingException e)
        { 
            fail(e.getMessage());
        } 
    } 
 
    public void testArrayConstructor() 
    { 
        try 
        { 
            HashedUser user = new HashedUser(new String[]{USERNAME, B64_ENCODED_PASSWORD});
            assertEquals("Username incorrect", USERNAME, user.getName());
            int index = 0;
 
            char[] hash = B64_ENCODED_PASSWORD.toCharArray();
 
            try 
            {