### Question:
Credentials { public byte[] getPassword() { return password; } Credentials(String username, byte[] password);  Credentials(String username, String password); String getUsername(); byte[] getPassword(); String toString();  }### Answer:
@Test public void testGetPasswordString() throws Exception { Credentials credentials = new Credentials(USERNAME, PASSWORD_STRING); assertArrayEquals(PASSWORD_STRING.getBytes(AuthConfig.CHARACTER_SET), credentials.getPassword()); }
@Test public void testGetPasswordByteArray() throws Exception { Credentials credentials = new Credentials(USERNAME, PASSWORD_BYTE_ARRAY); assertEquals(PASSWORD_BYTE_ARRAY, credentials.getPassword()); }