### Question:
NullPartition extends BasePartition implements JdbcFragmentMetadata { @Override public String toSqlConstraint(String quoteString, DbProduct dbProduct) { if (quoteString == null) { throw new RuntimeException("Quote string cannot be null"); } StringBuilder sb = new StringBuilder(); String columnQuoted = quoteString + column + quoteString; sb.append( columnQuoted ).append( isNull ? " IS NULL" : " IS NOT NULL" ); return sb.toString(); } NullPartition(String column, boolean isNull);  NullPartition(String column); @Override String toSqlConstraint(String quoteString, DbProduct dbProduct); boolean isNull();  }### Answer:
@Test public void testIsNotNull() { NullPartition partition = new NullPartition(COL_RAW, false); String constraint = partition.toSqlConstraint(QUOTE, dbProduct); assertEquals(COL + " IS NOT NULL", constraint); }
@Test public void testInvalidNullQuoteString() { thrown.expect(RuntimeException.class); NullPartition partition = new NullPartition(COL_RAW); partition.toSqlConstraint(null, dbProduct); }