use of eu.europa.ec.fisheries.schema.mobileterminal.polltypes.v1.PollListQuery in project UVMS-Docker by UnionVMS.
the class PollRestIT method getPollBySearchCriteriaTest.
/**
* Gets the poll by search criteria test.
*
* @return the poll by search criteria test
* @throws Exception
* the exception
*/
@Test
public void getPollBySearchCriteriaTest() throws Exception {
PollListQuery pollListQuery = new PollListQuery();
ListPagination pagination = new ListPagination();
pollListQuery.setPagination(pagination);
pagination.setListSize(100);
pagination.setPage(1);
PollSearchCriteria pollSearchCriteria = new PollSearchCriteria();
pollListQuery.setPollSearchCriteria(pollSearchCriteria);
pollSearchCriteria.setIsDynamic(true);
final HttpResponse response = Request.Post(getBaseUrl() + "mobileterminal/rest/poll/list").setHeader("Content-Type", "application/json").setHeader("Authorization", getValidJwtToken()).bodyByteArray(writeValueAsString(pollListQuery).getBytes()).execute().returnResponse();
Map<String, Object> dataMap = checkSuccessResponseReturnMap(response);
}
Aggregations