@Test public void testEquals() { final TerminalProperties.TerminalPropertiesBuilder builder = TerminalProperties.getNewBuilder(); builder.setSkipEnvset(true).setOsPromptPattern("osPromptPattern").setCclPromptPattern("cclPromptPattern") .setCclLoginPromptPattern("cclLoginPromptPattern") .setCclLoginSuccessPromptPattern("cclLoginSuccessPromptPattern").setCclLoginFailurePromptPatterns(null) .setCclLoginFailurePromptPatterns(Arrays.asList(new String[] { "pattern1", "pattern2" })) .setExpectationTimeout(2112).setSpecifyDebugCcl(false).setLogfileLocation("output.log"); final TerminalProperties tp1 = builder.build(); builder.setOsPromptPattern("osPromptPattern2"); final TerminalProperties tp2 = builder.build(); builder.setCclPromptPattern("cclPromptPattern2"); final TerminalProperties tp3 = builder.build(); builder.setCclLoginPromptPattern("cclLoginPromptPattern2"); final TerminalProperties tp4 = builder.build(); builder.setCclLoginSuccessPromptPattern("cclLoginSuccessPromptPattern2"); final TerminalProperties tp5 = builder.build(); builder.setCclLoginFailurePromptPatterns(Arrays.asList(new String[] { "pattern1a", "pattern2a" })); final TerminalProperties tp6 = builder.build(); builder.setSkipEnvset(false); final TerminalProperties tp7 = builder.build(); builder.setExpectationTimeout(2525); final TerminalProperties tp8 = builder.build(); builder.setSpecifyDebugCcl(true); final TerminalProperties tp9 = builder.build(); builder.setLogfileLocation("logfile.dat"); final TerminalProperties tp10 = builder.build(); assertThat(tp1.equals(tp1)).isEqualTo(true); assertThat(tp1.equals(tp2)).isEqualTo(false); assertThat(tp1.equals(tp3)).isEqualTo(false); assertThat(tp1.equals(tp4)).isEqualTo(false); assertThat(tp1.equals(tp5)).isEqualTo(false); assertThat(tp1.equals(tp6)).isEqualTo(false); assertThat(tp1.equals(tp7)).isEqualTo(false); assertThat(tp1.equals(tp8)).isEqualTo(false); assertThat(tp1.equals(tp9)).isEqualTo(false); assertThat(tp1.equals(tp10)).isEqualTo(false); assertThat(tp2.equals(tp3)).isEqualTo(false); assertThat(tp2.equals(tp4)).isEqualTo(false); assertThat(tp2.equals(tp5)).isEqualTo(false); assertThat(tp2.equals(tp6)).isEqualTo(false); assertThat(tp2.equals(tp7)).isEqualTo(false); assertThat(tp2.equals(tp8)).isEqualTo(false); assertThat(tp2.equals(tp9)).isEqualTo(false); assertThat(tp2.equals(tp10)).isEqualTo(false); assertThat(tp3.equals(tp4)).isEqualTo(false); assertThat(tp3.equals(tp5)).isEqualTo(false); assertThat(tp3.equals(tp6)).isEqualTo(false); assertThat(tp3.equals(tp7)).isEqualTo(false); assertThat(tp3.equals(tp8)).isEqualTo(false); assertThat(tp3.equals(tp9)).isEqualTo(false); assertThat(tp3.equals(tp10)).isEqualTo(false); assertThat(tp4.equals(tp5)).isEqualTo(false); assertThat(tp4.equals(tp6)).isEqualTo(false); assertThat(tp4.equals(tp7)).isEqualTo(false); assertThat(tp4.equals(tp8)).isEqualTo(false); assertThat(tp4.equals(tp9)).isEqualTo(false); assertThat(tp4.equals(tp10)).isEqualTo(false); assertThat(tp5.equals(tp6)).isEqualTo(false); assertThat(tp5.equals(tp7)).isEqualTo(false); assertThat(tp5.equals(tp8)).isEqualTo(false); assertThat(tp5.equals(tp9)).isEqualTo(false); assertThat(tp5.equals(tp10)).isEqualTo(false); assertThat(tp6.equals(tp7)).isEqualTo(false); assertThat(tp6.equals(tp8)).isEqualTo(false); assertThat(tp6.equals(tp9)).isEqualTo(false); assertThat(tp6.equals(tp10)).isEqualTo(false); assertThat(tp7.equals(tp8)).isEqualTo(false); assertThat(tp7.equals(tp9)).isEqualTo(false); assertThat(tp7.equals(tp10)).isEqualTo(false); assertThat(tp8.equals(tp9)).isEqualTo(false); assertThat(tp8.equals(tp10)).isEqualTo(false); assertThat(tp9.equals(tp10)).isEqualTo(false); }
@Override public boolean equals(final Object obj) { if (obj == null) { return false; } if (obj == this) { return true; } if (obj.getClass() != getClass()) { return false; } final TerminalProperties rhs = (TerminalProperties) obj; return new EqualsBuilder().append(skipEnvset, rhs.skipEnvset).append(osPromptPattern, rhs.osPromptPattern) .append(cclPromptPattern, rhs.cclPromptPattern).append(cclLoginPromptPattern, rhs.cclLoginPromptPattern) .append(cclLoginSuccessPromptPattern, rhs.cclLoginSuccessPromptPattern) .append(cclLoginFailurePromptPatterns, rhs.cclLoginFailurePromptPatterns) .append(expectationTimeout, rhs.expectationTimeout).append(logfileLocation, rhs.logfileLocation) .append(specifyDebugCcl, rhs.specifyDebugCcl).isEquals(); }
TerminalProperties { @Override public boolean equals(final Object obj) { if (obj == null) { return false; } if (obj == this) { return true; } if (obj.getClass() != getClass()) { return false; } final TerminalProperties rhs = (TerminalProperties) obj; return new EqualsBuilder().append(skipEnvset, rhs.skipEnvset).append(osPromptPattern, rhs.osPromptPattern) .append(cclPromptPattern, rhs.cclPromptPattern).append(cclLoginPromptPattern, rhs.cclLoginPromptPattern) .append(cclLoginSuccessPromptPattern, rhs.cclLoginSuccessPromptPattern) .append(cclLoginFailurePromptPatterns, rhs.cclLoginFailurePromptPatterns) .append(expectationTimeout, rhs.expectationTimeout).append(logfileLocation, rhs.logfileLocation) .append(specifyDebugCcl, rhs.specifyDebugCcl).isEquals(); } }
TerminalProperties { @Override public boolean equals(final Object obj) { if (obj == null) { return false; } if (obj == this) { return true; } if (obj.getClass() != getClass()) { return false; } final TerminalProperties rhs = (TerminalProperties) obj; return new EqualsBuilder().append(skipEnvset, rhs.skipEnvset).append(osPromptPattern, rhs.osPromptPattern) .append(cclPromptPattern, rhs.cclPromptPattern).append(cclLoginPromptPattern, rhs.cclLoginPromptPattern) .append(cclLoginSuccessPromptPattern, rhs.cclLoginSuccessPromptPattern) .append(cclLoginFailurePromptPatterns, rhs.cclLoginFailurePromptPatterns) .append(expectationTimeout, rhs.expectationTimeout).append(logfileLocation, rhs.logfileLocation) .append(specifyDebugCcl, rhs.specifyDebugCcl).isEquals(); } private  TerminalProperties(); private  TerminalProperties(final TerminalPropertiesBuilder builder); }
TerminalProperties { @Override public boolean equals(final Object obj) { if (obj == null) { return false; } if (obj == this) { return true; } if (obj.getClass() != getClass()) { return false; } final TerminalProperties rhs = (TerminalProperties) obj; return new EqualsBuilder().append(skipEnvset, rhs.skipEnvset).append(osPromptPattern, rhs.osPromptPattern) .append(cclPromptPattern, rhs.cclPromptPattern).append(cclLoginPromptPattern, rhs.cclLoginPromptPattern) .append(cclLoginSuccessPromptPattern, rhs.cclLoginSuccessPromptPattern) .append(cclLoginFailurePromptPatterns, rhs.cclLoginFailurePromptPatterns) .append(expectationTimeout, rhs.expectationTimeout).append(logfileLocation, rhs.logfileLocation) .append(specifyDebugCcl, rhs.specifyDebugCcl).isEquals(); } private  TerminalProperties(); private  TerminalProperties(final TerminalPropertiesBuilder builder); static String constructDefaultOsPromptPattern(final String host, final String environment,
            final String username); static TerminalPropertiesBuilder getNewBuilder(); boolean getSkipEnvset(); String getOsPromptPattern(); String getCclPromptPattern(); String getCclLoginPromptPattern(); String getCclLoginSuccessPromptPattern(); List<String> getCclLoginFailurePromptPatterns(); long getExpectationTimeout(); boolean getSpecifyDebugCcl(); String getLogfileLocation(); @Override boolean equals(final Object obj); @Override int hashCode(); static void setGlobalTerminalProperties(final TerminalProperties terminalProperties); static TerminalProperties getGlobalTerminalProperties(); }
TerminalProperties { @Override public boolean equals(final Object obj) { if (obj == null) { return false; } if (obj == this) { return true; } if (obj.getClass() != getClass()) { return false; } final TerminalProperties rhs = (TerminalProperties) obj; return new EqualsBuilder().append(skipEnvset, rhs.skipEnvset).append(osPromptPattern, rhs.osPromptPattern) .append(cclPromptPattern, rhs.cclPromptPattern).append(cclLoginPromptPattern, rhs.cclLoginPromptPattern) .append(cclLoginSuccessPromptPattern, rhs.cclLoginSuccessPromptPattern) .append(cclLoginFailurePromptPatterns, rhs.cclLoginFailurePromptPatterns) .append(expectationTimeout, rhs.expectationTimeout).append(logfileLocation, rhs.logfileLocation) .append(specifyDebugCcl, rhs.specifyDebugCcl).isEquals(); } private  TerminalProperties(); private  TerminalProperties(final TerminalPropertiesBuilder builder); static String constructDefaultOsPromptPattern(final String host, final String environment,
            final String username); static TerminalPropertiesBuilder getNewBuilder(); boolean getSkipEnvset(); String getOsPromptPattern(); String getCclPromptPattern(); String getCclLoginPromptPattern(); String getCclLoginSuccessPromptPattern(); List<String> getCclLoginFailurePromptPatterns(); long getExpectationTimeout(); boolean getSpecifyDebugCcl(); String getLogfileLocation(); @Override boolean equals(final Object obj); @Override int hashCode(); static void setGlobalTerminalProperties(final TerminalProperties terminalProperties); static TerminalProperties getGlobalTerminalProperties();  }