### Question:
WhereClausePartUtil implements IWhereClausePartUtil { @Override public int setParameters(PreparedStatement pstmt, List<IWhereClausePart> whereClauseParts, int firstPosition) throws SQLException { int position = firstPosition; for (IWhereClausePart whereClausePart : whereClauseParts) { if(whereClausePart.shouldBeUsed()){ if (whereClausePart.isParameterUsed()) { whereClausePart.setParameter(pstmt, position); position++; } } } return position++; }  @Override String createWhereClause(
			List<IWhereClausePart> whereClauseParts); @Override int setParameters(PreparedStatement pstmt,
			List<IWhereClausePart> whereClauseParts, int firstPosition); @Override boolean hasUsableWhereClause(List<IWhereClausePart> whereClauseParts);  }### Answer:
@Test public void testSetParameters() throws SQLException{ List<IWhereClausePart> parts = new ArrayList<IWhereClausePart>(); parts.add(nopWhereClause); parts.add(isNullWhereClause); parts.add(noParameterWhereClause); parts.add(parameterWhereClause); parts.add(anotherParameterWhereClause); int nextIndex = whereClausePartUtil.setParameters(mockPstmt, parts , 2); assertEquals(4, nextIndex); EasyMock.verify(mockLongDataTypeComponent); EasyMock.verify(mockStringDataTypeComponent); }