Examples of searchMessages()


Examples of com.streamreduce.core.service.SearchServiceImpl.searchMessages()

        ReflectionTestUtils.setField(searchService,"messageDatabaseName","nodeablemsgdb");
        ReflectionTestUtils.setField(searchService,"enabled",true);


        //Make sure calls to searchMessages uses the real implementation
        when(searchService.searchMessages(any(Account.class), anyString(), anyMap(), any(JSONObject.class))).thenCallRealMethod();
        //Make call to makeRequest so that it returns the elasticSearchPayload
        when(searchService.makeRequest(anyString(),any(JSONObject.class),anyMap(),anyString())).thenReturn(elasticSearchPayload);


        Account a = new Account.Builder().name("testAccount").build();
View Full Code Here

Examples of com.streamreduce.core.service.SearchServiceImpl.searchMessages()


        Account a = new Account.Builder().name("testAccount").build();
        a.setId(new ObjectId());

        List<SobaMessage> sobaMessages = searchService.searchMessages(a,"resource", null,null);

        //Expected number of hits in json:
        int expectedSize = elasticSearchPayload.getJSONObject("hits").getJSONArray("hits").size();
        Assert.assertEquals(expectedSize,sobaMessages.size());
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.