### Question:
NoParameterWhereClausePart extends AbstractWhereClausePart { @Override public void setParameter(PreparedStatement pstmt, int position) throws SQLException { throw new IllegalStateException( "An " +getClass().getSimpleName() + "cannot set an parameter into an PreparedStatement!"); } NoParameterWhereClausePart(ColumnDisplayDefinition columnDef, String clause); @Override boolean isParameterUsed(); @Override void setParameter(PreparedStatement pstmt, int position);  }### Answer:
@Test(expected=IllegalStateException.class) public void testSetParameter() throws Exception { classUnderTest.setParameter(mockPstmt, 1); }