### Question:
GeneralAdminInpForSQ extends AbstractIRODSPackingInstruction { public static final GeneralAdminInpForSQ instanceForRemoveSpecificQuery(final SpecificQueryDefinition specificQuery) throws JargonException { if (specificQuery == null) { throw new IllegalArgumentException("null SpecificQueryDefinition object"); } return instanceForRemoveSpecificQueryByAlias(specificQuery.getAlias()); } private  GeneralAdminInpForSQ(final String query, final String alias, final String action); static final GeneralAdminInpForSQ instanceForAddSpecificQuery(final SpecificQueryDefinition specificQuery); static final GeneralAdminInpForSQ instanceForRemoveSpecificQuery(final SpecificQueryDefinition specificQuery); static final GeneralAdminInpForSQ instanceForRemoveSpecificQueryByAlias(final String alias); static final GeneralAdminInpForSQ instanceForRemoveAllSpecificQueryBySQL(final String query); @Override Tag getTagValue(); String getSqlQuery(); void setSqlQuery(final String sqlQuery); String getAlias(); void setAlias(final String alias); String getAction(); void setAction(final String action);  }### Answer:
@Test public void testRemoveSpecificQuery() throws Exception { String query = "select count(data_id) from r_data_main"; String alias = "get_dataobject_ids"; SpecificQueryDefinition specificQuery = new SpecificQueryDefinition(query, alias); GeneralAdminInpForSQ pi = GeneralAdminInpForSQ.instanceForRemoveSpecificQuery(specificQuery); Assert.assertNotNull(pi); }
@Test public void testRemoveSpecificQueryCheckXML() throws Exception { String query = "select count(data_id) from r_data_main"; String alias = "get_dataobject_ids"; SpecificQueryDefinition specificQuery = new SpecificQueryDefinition(query, alias); GeneralAdminInpForSQ pi = GeneralAdminInpForSQ.instanceForRemoveSpecificQuery(specificQuery); String tagOut = pi.getParsedTags(); StringBuilder sb = new StringBuilder(); sb.append("<generalAdminInp_PI><arg0>rm</arg0>\n"); sb.append("<arg1>specificQuery</arg1>\n"); sb.append("<arg2>"); sb.append(alias); sb.append("</arg2>\n"); sb.append("<arg3></arg3>\n"); sb.append("<arg4></arg4>\n"); sb.append("<arg5></arg5>\n"); sb.append("<arg6></arg6>\n"); sb.append("<arg7></arg7>\n"); sb.append("<arg8></arg8>\n"); sb.append("<arg9></arg9>\n"); sb.append("</generalAdminInp_PI>\n"); Assert.assertEquals("unexpected XML protocol result", sb.toString(), tagOut); }
@Test(expected = IllegalArgumentException.class) public void testRemoveSpecificQueryNullSQ() throws Exception { GeneralAdminInpForSQ.instanceForRemoveSpecificQuery(null); }
@Test(expected = IllegalArgumentException.class) public void testRemoveSpecificQueryNullAlias() throws Exception { String query = "select count(data_id) from r_data_main"; SpecificQueryDefinition specificQuery = new SpecificQueryDefinition(query, null); GeneralAdminInpForSQ.instanceForRemoveSpecificQuery(specificQuery); }
@Test public void testRemoveSpecificQueryNullQuery() throws Exception { String alias = "get_dataobject_ids"; SpecificQueryDefinition specificQuery = new SpecificQueryDefinition(null, alias); GeneralAdminInpForSQ pi = GeneralAdminInpForSQ.instanceForRemoveSpecificQuery(specificQuery); Assert.assertNotNull(pi); }