@Test
public void should_return_search_result_when_give_search_conditions() throws Exception {

    Tracing[] orders = new Tracing[]{new Tracing(3), new Tracing(2), new Tracing(1)};
    List<Tracing> orderList = Arrays.asList(orders);
    when(tracingDao.getAllTracingsByConditionGroup(anyString(), anyString(), any(ConditionGroup.class)))
            .thenReturn(orderList);
    assertThat("When call getCPSearchResult() should return search result depends on search " +
                    "condition",
            tracingService.getSearchResult("uniqueId", "name", 1, 20, new Date(20161108)),
            is(Arrays.asList(new Long[]{3L, 2L, 1L})));
}