### Question:
UsernameValidator { public static boolean isUsernameValid(String username) { return username.length() >= 4 && !username.contains(" "); }  static boolean isUsernameValid(String username);  }### Answer:
@Test public void usernameValidator_CheckUsername() { UsernameValidator uv = new UsernameValidator(); assertTrue(uv.isUsernameValid("Username")); assertFalse(uv.isUsernameValid("us")); assertFalse(uv.isUsernameValid("us ername")); }