### Question:
MessageCount { public static MessageCount fromString(String value) { MessageCount mc; if((mc = parse(value, Operation.equals)) != null) { return mc; } if((mc = parse(value, Operation.notEquals)) != null) { return mc; } if((mc = parse(value, Operation.greaterOrEquals)) != null) { return mc; } if((mc = parse(value, Operation.greater)) != null) { return mc; } if((mc = parse(value, Operation.lessOrEquals)) != null) { return mc; } if((mc = parse(value, Operation.less)) != null) { return mc; } if (isInterval(value)){ Range range = Range.newInstance(value); return new MessageCount(range); } try { int i = Integer.parseInt(value); if(i >= 0) { return new MessageCount(i, Operation.equals); } } catch (NumberFormatException ignore){} return mc; } private  MessageCount(int count, Operation op); private  MessageCount(Range range); static MessageCount fromString(String value); static void main(String[] args); static boolean isValidExpression(String value); int getCount(); Operation getOperation(); boolean checkInt(int i); @Override String toString();  }### Answer:
@Test public void testFromStringIncorrectValue1() throws Exception { MessageCount messageCount = MessageCount.fromString(inputStrings.get("IncorrectValue1").getKey()); assertNull(messageCount); }
@Test public void testFromStringIncorrectValue2() throws Exception { MessageCount messageCount = MessageCount.fromString(inputStrings.get("IncorrectValue2").getKey()); assertNull(messageCount); }
@Test public void testFromStringIncorrectValue3() throws Exception { assertNull(MessageCount.fromString(">10>")); assertNull(MessageCount.fromString("<10>")); assertNull(MessageCount.fromString(" > 10 > ")); assertNull(MessageCount.fromString("!== 10")); assertNull(MessageCount.fromString("!=!= 10")); }