MBooleanInput extends MInput<Boolean> { @Override public boolean equals(Object other) { if (!(other instanceof MBooleanInput)) { return false; } MBooleanInput mbi = (MBooleanInput)other; return getName().equals(mbi.getName()) && (isSensitive() == mbi.isSensitive()); } MBooleanInput(String name, boolean sensitive, InputEditable editable, String overrides); @Override String getUrlSafeValueString(); @Override void restoreFromUrlSafeValueString(String valueString); @Override MInputType getType(); @Override boolean equals(Object other); @Override int hashCode(); @Override boolean isEmpty(); @Override void setEmpty(); @Override Object clone(boolean cloneWithValue);  }
@Test public void testEquals() { MBooleanInput input1 = new MBooleanInput("sqoopsqoop", true, InputEditable.ANY, StringUtils.EMPTY); MBooleanInput input2 = new MBooleanInput("sqoopsqoop", true, InputEditable.ANY, StringUtils.EMPTY); assertTrue(input1.equals(input2)); MBooleanInput input3 = new MBooleanInput("sqoopsqoop", false, InputEditable.ANY, StringUtils.EMPTY ); MBooleanInput input4 = new MBooleanInput("sqoopsqoop", true, InputEditable.ANY, StringUtils.EMPTY ); assertFalse(input3.equals(input4)); MBooleanInput input5 = new MBooleanInput("sqoopsqoop", false, InputEditable.ANY, StringUtils.EMPTY ); MBooleanInput input6 = new MBooleanInput("sqoop", false, InputEditable.ANY, StringUtils.EMPTY ); assertFalse(input5.equals(input6)); }