Prompt { @Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof Prompt)) return false; Prompt prompt1 = (Prompt) o; if (ansiString != null ? !Arrays.equals(ansiString, prompt1.ansiString) : prompt1.ansiString != null) return false; if (mask != null ? !mask.equals(prompt1.mask) : prompt1.mask != null) return false; return Arrays.equals(prompt, prompt1.prompt); } Prompt();  Prompt(String prompt);  Prompt(Prompt prompt);  Prompt(String prompt, String ansiString);  Prompt(String prompt, Character mask);  Prompt(String prompt, String ansiString, Character mask);  Prompt(int[] prompt, Character mask);  Prompt(TerminalString terminalString);  Prompt(List<TerminalCharacter> characters);  Prompt(List<TerminalCharacter> characters, Character mask); Character getMask(); boolean isMasking(); int[] getPromptAsString(); int getLength(); boolean hasANSI(); int[] getANSI(); Prompt copy(); @Override boolean equals(Object o); @Override int hashCode();  }
@Test public void testEquals() { Prompt p1 = new Prompt("[foo@bar]"); Prompt p2 = new Prompt("[disconnected]"); assertFalse(p1.equals(p2)); p1 = new Prompt("[disconnected]"); assertTrue(p1.equals(p2)); p1 = new Prompt("[disconnected]", '\0'); assertFalse(p1.equals(p2)); p2 = new Prompt("[disconnected]", '#'); assertFalse(p1.equals(p2)); p1 = new Prompt("[disconnected]", '#'); assertTrue(p1.equals(p2)); }