@Test(expected = IllegalArgumentException.class) public void testNullCannotBeAppended() { QueryBuilder builder = new QueryBuilder(); builder.append(null); }
public QueryBuilder append(String part) { checkArgument(part != null, "You must specify a 'part'."); if (builder.length() > 0) { builder.append(" "); } builder.append(part.trim()); return this; }
QueryBuilder { public QueryBuilder append(String part) { checkArgument(part != null, "You must specify a 'part'."); if (builder.length() > 0) { builder.append(" "); } builder.append(part.trim()); return this; } }
QueryBuilder { public QueryBuilder append(String part) { checkArgument(part != null, "You must specify a 'part'."); if (builder.length() > 0) { builder.append(" "); } builder.append(part.trim()); return this; } QueryBuilder();  QueryBuilder(String part); }
QueryBuilder { public QueryBuilder append(String part) { checkArgument(part != null, "You must specify a 'part'."); if (builder.length() > 0) { builder.append(" "); } builder.append(part.trim()); return this; } QueryBuilder();  QueryBuilder(String part); QueryBuilder append(String part); @Override String toString(); }
QueryBuilder { public QueryBuilder append(String part) { checkArgument(part != null, "You must specify a 'part'."); if (builder.length() > 0) { builder.append(" "); } builder.append(part.trim()); return this; } QueryBuilder();  QueryBuilder(String part); QueryBuilder append(String part); @Override String toString();  }