public String getWhereClause()
    {
        if (partitionId.equals(CassandraPartition.UNPARTITIONED_ID)) {
            if (splitCondition != null) {
                return " WHERE " + splitCondition;
            }
            else {
                return "";
            }
        }
        else {
            if (splitCondition != null) {
                return " WHERE " + partitionId + " AND " + splitCondition;
            }
            else {
                return " WHERE " + partitionId;
            }
        }
    }
@Test
    public void testWhereClause()
    {
        CassandraSplit split;
        split = new CassandraSplit(
                "connectorId",
                "schema1",
                "table1",
                CassandraPartition.UNPARTITIONED_ID,
                "token(k) >= 0 AND token(k) <= 2",
                addresses);
        assertEquals(split.getWhereClause(), " WHERE token(k) >= 0 AND token(k) <= 2");

        split = new CassandraSplit(
                "connectorId",
                "schema1",
                "table1",
                "key = 123",
                null,
                addresses);
        assertEquals(split.getWhereClause(), " WHERE key = 123");
    }