### Question:
Password { public String create(){ StringBuilder sb = new StringBuilder(); for (int i = 0; i < length ; i++) { int charIndex = (int) (Math.random() * PASSCHARS.length); sb.append(PASSCHARS[charIndex]); } return sb.toString(); } Password(Integer length); String create();  }### Answer:
@Test public void createPasswordWithSpecifiedLength(){ String password = new Password(10).create(); assertNotNull(password); assertEquals(10,password.length()); }