FailoverPriority { public static FailoverPriority consistency() { return new FailoverPriority(CONSISTENCY, 0); } protected  FailoverPriority(Type type, Integer voters); Type getType(); int getVoters(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); static FailoverPriority availability(); static FailoverPriority consistency(); static FailoverPriority consistency(int voters); static FailoverPriority valueOf(String str);  }
@Test public void test_consistency() { assertThat( () -> consistency(-1), is(throwing(instanceOf(IllegalArgumentException.class)).andMessage(is(equalTo(ERR_MSG))))); assertThat( () -> consistency(0), is(not(throwing(instanceOf(IllegalArgumentException.class)).andMessage(is(equalTo(ERR_MSG)))))); }