@Test
    public void testConstantScorePrefixSubQueryCreation() {
        final AbstractIssuePickerSearchProvider.QueryCreator queryCreator = getConstantScorePrefixQueryCreator("web search", "summary");
        final Query query = queryCreator.getQuery();

        assertNotNull(query);
        assertEquals("summary:web* summary:search*", query.toString());
    }
    @Test
    public void testWildCardQueryCreation()
    {
        final AbstractIssuePickerSearchProvider.QueryCreator queryCreator = getWildCardQueryCreator("web search", "key");
        final Query query = queryCreator.getQuery();

        assertNotNull(query);
        assertEquals("key:*web* key:*search*", query.toString());
    }
    @Test
    public void testWildCardQueryCreationNullTerm()
    {
        final AbstractIssuePickerSearchProvider.QueryCreator queryCreator = getWildCardQueryCreator(null, "key");
        final Query query = queryCreator.getQuery();

        assertNotNull(query);
        assertEquals("", query.toString());

        final Collection<String> terms = queryCreator.getTokens();

        assertNotNull(terms);
        assertEquals(0, terms.size());

    }
    @Test
    public void testWildCardQueryCreationSingleNumberTerm()
    {
        final AbstractIssuePickerSearchProvider.QueryCreator queryCreator = getWildCardQueryCreator("123", "key");
        final Query query = queryCreator.getQuery();

        assertNotNull(query);
        assertEquals("key:*-123^1.5", query.toString());

        final Collection<String> terms = queryCreator.getTokens();

        assertNotNull(terms);
        assertEquals(1, terms.size());
        final String term = terms.iterator().next();

        assertEquals("123", term);

    }
    @Test
    public void testPrefixQueryCreationMultiNumberTerms()
    {
        final AbstractIssuePickerSearchProvider.QueryCreator queryCreator = getPrefixQueryCreator("123 1234", "summary");
        final Query query = queryCreator.getQuery();

        assertNotNull(query);
        assertEquals("summary:123* summary:1234*", query.toString());

        final Collection<String> terms = queryCreator.getTokens();

        assertNotNull(terms);
        assertEquals(2, terms.size());

        assertTrue(terms.contains("123"));
        assertTrue(terms.contains("1234"));

    }
    @Test
    public void testPrefixQueryCreationSingleTerm()
    {
        final AbstractIssuePickerSearchProvider.QueryCreator queryCreator = getPrefixQueryCreator("web", "summary");
        final Query query = queryCreator.getQuery();

        assertNotNull(query);
        assertEquals("summary:web*", query.toString());

        final Collection<String> terms = queryCreator.getTokens();

        assertNotNull(terms);
        assertEquals(1, terms.size());
        final String term = terms.iterator().next();

        assertEquals("web", term);

    }
    @Test
    public void testWildCardQueryCreationMultiNumberTerms()
    {
        final AbstractIssuePickerSearchProvider.QueryCreator queryCreator = getWildCardQueryCreator("123 1234", "key");
        final Query query = queryCreator.getQuery();

        assertNotNull(query);
        assertEquals("key:*-123^1.5 key:*-1234^1.5", query.toString());

        final Collection<String> terms = queryCreator.getTokens();

        assertNotNull(terms);
        assertEquals(2, terms.size());

        assertTrue(terms.contains("123"));
        assertTrue(terms.contains("1234"));

    }
    @Test
    public void testPrefixQueryCreationMixedTerms()
    {
        final AbstractIssuePickerSearchProvider.QueryCreator queryCreator = getPrefixQueryCreator("123 abc 1234", "blarg");
        final Query query = queryCreator.getQuery();

        assertNotNull(query);
        assertEquals("blarg:123* blarg:abc* blarg:1234*", query.toString());

        final Collection<String> terms = queryCreator.getTokens();

        assertNotNull(terms);
        assertEquals(3, terms.size());

        assertTrue(terms.contains("123"));
        assertTrue(terms.contains("1234"));
        assertTrue(terms.contains("abc"));

    }