### Question:
QueryUtils { public static String queryStrFrom( Map<String, List<String>> params ) { if ( params.containsKey( PARAM_QL ) ) { return ListUtils.first( params.get( PARAM_QL ) ); } else if ( params.containsKey( PARAM_Q ) ) { return ListUtils.first( params.get( PARAM_Q ) ); } else if ( params.containsKey( PARAM_QUERY ) ) { return ListUtils.first( params.get( PARAM_QUERY ) ); } return null; }  static String queryStrFrom( Map<String, List<String>> params ); static List<Object> getSelectionResults( Query q, Results rs ); static final String PARAM_QL; static final String PARAM_Q; static final String PARAM_QUERY; }### Answer:
@Test public void extractQueryAlias() { params.put( QueryUtils.PARAM_QL, Arrays.asList( FAKE_QL ) ); String query = QueryUtils.queryStrFrom( params ); assertEquals( FAKE_QL, query ); params.clear(); params.put( QueryUtils.PARAM_Q, Arrays.asList( FAKE_QL ) ); query = QueryUtils.queryStrFrom( params ); assertEquals( FAKE_QL, query ); params.clear(); params.put( QueryUtils.PARAM_QUERY, Arrays.asList( FAKE_QL ) ); query = QueryUtils.queryStrFrom( params ); assertEquals( FAKE_QL, query ); params.clear(); }