### Question:
PasswordValidator { public static boolean isPasswordValid(String password) { return (password.length() >= 6 && !password.contains(" ")); }  static boolean isPasswordValid(String password);  }### Answer:
@Test public void passwordValidator_checkPassword() { PasswordValidator pv = new PasswordValidator(); assertTrue(pv.isPasswordValid("thispasswordisnotvalid")); assertTrue(pv.isPasswordValid("123456")); assertFalse(pv.isPasswordValid("this password is not valid as well")); assertFalse(pv.isPasswordValid("12345")); }