### Question:
IRODSGenQueryFromBuilder extends AbstractIRODSGenQuery { public TranslatedIRODSGenQuery convertToTranslatedIRODSGenQuery() throws GenQueryBuilderException { if (!irodsGenQueryBuilderData.isQueryValid()) { throw new GenQueryBuilderException("Query is not valid"); } List<TranslatedGenQueryCondition> conditions = new ArrayList<TranslatedGenQueryCondition>(); for (GenQueryBuilderCondition builderCondition : irodsGenQueryBuilderData.getConditions()) { String value; if (irodsGenQueryBuilderData.isUpperCase()) { value = builderCondition.getValue().toUpperCase(); } else { value = builderCondition.getValue(); } try { conditions.add(TranslatedGenQueryCondition.instanceWithFieldNameAndNumericTranslation( builderCondition.getSelectFieldColumnName(), builderCondition.getOperator().getOperatorAsString(), value, builderCondition.getSelectFieldNumericTranslation())); } catch (JargonQueryException e) { throw new GenQueryBuilderException("error building translated query", e); } } try { return TranslatedIRODSGenQuery.instance(irodsGenQueryBuilderData.getSelectFields(), conditions, irodsGenQueryBuilderData.getOrderByFields(), this, irodsGenQueryBuilderData.isDistinct(), irodsGenQueryBuilderData.isUpperCase(), irodsGenQueryBuilderData.isComputeTotalRowCount()); } catch (JargonException e) { throw new GenQueryBuilderException("exception building a translated query from this builder query", e); } } private  IRODSGenQueryFromBuilder(final IRODSGenQueryBuilderQueryData irodsGenQueryBuilderData,
			final int numberOfResultsDesired); static IRODSGenQueryFromBuilder instance(final IRODSGenQueryBuilderQueryData irodsGenQueryBuilderData,
			final int numberOfResultsDesired); IRODSGenQueryBuilderQueryData getIrodsGenQueryBuilderData(); TranslatedIRODSGenQuery convertToTranslatedIRODSGenQuery(); @Override String toString();  }### Answer:
@Test public void testCaseInsensitiveQueryMakesConditionsUpperCase() throws Exception { String testValue = "testvalue"; IRODSGenQueryBuilder irodsGenQueryBuilder = new IRODSGenQueryBuilder(true, true, null); irodsGenQueryBuilder.addSelectAsGenQueryValue(RodsGenQueryEnum.COL_D_DATA_PATH).addConditionAsGenQueryField( RodsGenQueryEnum.COL_COLL_ACCESS_NAME, QueryConditionOperators.EQUAL, testValue); IRODSGenQueryFromBuilder query = irodsGenQueryBuilder.exportIRODSQueryFromBuilder(10); TranslatedIRODSGenQuery translatedIRODSGenQuery = query.convertToTranslatedIRODSGenQuery(); TranslatedGenQueryCondition condition = translatedIRODSGenQuery.getTranslatedQueryConditions().get(0); Assert.assertEquals("did not upper case the condition", '\'' + testValue.toUpperCase() + '\'', condition.getValue()); }
@Test public void testCaseInsensitiveQueryNotUpperCase() throws Exception { String testValue = "testvalue"; IRODSGenQueryBuilder irodsGenQueryBuilder = new IRODSGenQueryBuilder(true, false, null); irodsGenQueryBuilder.addSelectAsGenQueryValue(RodsGenQueryEnum.COL_D_DATA_PATH).addConditionAsGenQueryField( RodsGenQueryEnum.COL_COLL_ACCESS_NAME, QueryConditionOperators.EQUAL, testValue); IRODSGenQueryFromBuilder query = irodsGenQueryBuilder.exportIRODSQueryFromBuilder(10); TranslatedIRODSGenQuery translatedIRODSGenQuery = query.convertToTranslatedIRODSGenQuery(); TranslatedGenQueryCondition condition = translatedIRODSGenQuery.getTranslatedQueryConditions().get(0); Assert.assertEquals("did not upper case the condition", '\'' + testValue + '\'', condition.getValue()); }