@Test
public void testSetRequestParameters() {

	DDMRESTDataProviderSettings ddmRESTDataProviderSettings = mock(
		DDMRESTDataProviderSettings.class);
	when(
		ddmRESTDataProviderSettings.url()
	).thenReturn(
		"http://liferay.com/api"
	);
	when(
		ddmRESTDataProviderSettings.filterable()
	).thenReturn(
		true
	);
	when(
		ddmRESTDataProviderSettings.inputParameters()
	).thenReturn(
		new DDMDataProviderInputParametersSettings[0]
	);
	when(
		ddmRESTDataProviderSettings.pagination()
	).thenReturn(
		true
	);
	when(
		ddmRESTDataProviderSettings.filterParameterName()
	).thenReturn(
		"country"
	);
	when(
		ddmRESTDataProviderSettings.paginationStartParameterName()
	).thenReturn(
		"start"
	);
	when(
		ddmRESTDataProviderSettings.paginationEndParameterName()
	).thenReturn(
		"end"
	);
	HttpRequest httpRequest = mock(HttpRequest.class);
	HttpRequest spy = spy(httpRequest);
	DDMDataProviderRequest.Builder builder =
		DDMDataProviderRequest.Builder.newBuilder();
	DDMDataProviderRequest ddmDataProviderRequest = builder.withParameter(
		"filterParameterValue", "brazil"
	).withParameter(
		"paginationStart", "1"
	).withParameter(
		"paginationEnd", "10"
	).build();
	_ddmRESTDataProvider.setRequestParameters(
		ddmDataProviderRequest, ddmRESTDataProviderSettings, spy);
	ArgumentCaptor<String> name = ArgumentCaptor.forClass(String.class);
	ArgumentCaptor<String> value = ArgumentCaptor.forClass(String.class);
	Mockito.verify(
		spy, Mockito.times(3)
	).query(
		name.capture(), value.capture()
	);
	List<String> names = new ArrayList<String>() {
		{
			add("country");
			add("start");
			add("end");
		}
	};
	Assert.assertEquals(names, name.getAllValues());
	List<String> values = new ArrayList<String>() {
		{
			add("brazil");
			add("1");
			add("10");
		}
	};
	Assert.assertEquals(values, value.getAllValues());
}