@Test
public void testDoGetData() throws Exception {

	DDMDataProviderInstanceService ddmDataProviderInstanceService = mock(
		DDMDataProviderInstanceService.class);
	DDMDataProviderInstance ddmDataProviderInstance = mock(
		DDMDataProviderInstance.class);
	when(
		ddmDataProviderInstanceService.fetchDataProviderInstance(1L)
	).thenReturn(
		ddmDataProviderInstance
	);
	DDMDataProviderInstanceSettings ddmDataProviderInstanceSettings = mock(
		DDMDataProviderInstanceSettings.class);
	DDMRESTDataProviderSettings ddmRESTDataProviderSettings =
		_createDDMRESTDataProviderSettings();
	when(
		ddmDataProviderInstanceSettings.getSettings(
			Matchers.any(DDMDataProviderInstance.class), Matchers.any())
	).thenReturn(
		ddmRESTDataProviderSettings
	);
	mockStatic(HttpRequest.class);
	HttpRequest httpRequest = mock(HttpRequest.class);
	HttpRequest spyHttpRequest = spy(httpRequest);
	when(
		HttpRequest.get(Matchers.anyString())
	).thenReturn(
		spyHttpRequest
	);
	HttpResponse httpResponse = mock(HttpResponse.class);
	HttpResponse spyHttpResponse = spy(httpResponse);
	when(
		spyHttpRequest.send()
	).thenReturn(
		spyHttpResponse
	);
	when(
		spyHttpResponse.bodyText()
	).thenReturn(
		"{}"
	);
	DDMDataProviderRequest.Builder builder =
		DDMDataProviderRequest.Builder.newBuilder();
	DDMDataProviderRequest ddmDataProviderRequest =
		builder.withDDMDataProviderId(
			"1"
		).build();
	_ddmRESTDataProvider.ddmDataProviderInstanceService =
		ddmDataProviderInstanceService;
	_ddmRESTDataProvider.ddmDataProviderInstanceSettings =
		ddmDataProviderInstanceSettings;
	MultiVMPool multiVMPool = mock(MultiVMPool.class);
	PortalCache portalCache = mock(PortalCache.class);
	PortalCache spyPortalCache = spy(portalCache);
	when(
		multiVMPool.getPortalCache(DDMRESTDataProvider.class.getName())
	).thenReturn(
		spyPortalCache
	);
	_ddmRESTDataProvider.setMultiVMPool(multiVMPool);
	_ddmRESTDataProvider.doGetData(ddmDataProviderRequest);
	ArgumentCaptor<String> userNameArgumentCaptor = ArgumentCaptor.forClass(
		String.class);
	ArgumentCaptor<String> passwordArgumentCaptor = ArgumentCaptor.forClass(
		String.class);
	Mockito.verify(
		spyHttpRequest, Mockito.times(1)
	).basicAuthentication(
		userNameArgumentCaptor.capture(), passwordArgumentCaptor.capture()
	);
	Assert.assertEquals(
		ddmRESTDataProviderSettings.username(),
		userNameArgumentCaptor.getValue());
	Assert.assertEquals(
		ddmRESTDataProviderSettings.password(),
		passwordArgumentCaptor.getValue());
	Mockito.verify(
		spyHttpRequest, Mockito.times(1)
	).send();
	Mockito.verify(
		spyHttpResponse, Mockito.times(1)
	).bodyText();
	Mockito.verify(
		spyPortalCache, Mockito.times(1)
	).put(
		Matchers.any(Serializable.class), Matchers.any()
	);
}