@Test
public void testDoInvoke() throws Exception {

	DDMDataProviderInvokerImpl ddmDataProviderInvokerImpl = mock(
		DDMDataProviderInvokerImpl.class);
	DDMDataProviderRequest.Builder builder =
		DDMDataProviderRequest.Builder.newBuilder();
	DDMDataProviderRequest ddmDataProviderRequest =
		builder.withDDMDataProviderId(
			"2"
		).build();
	Optional<DDMDataProviderInstance> optional = Optional.empty();
	when(
		ddmDataProviderInvokerImpl.fetchDDMDataProviderInstanceOptional("2")
	).thenReturn(
		optional
	);
	DDMDataProvider ddmDataProvider = mock(DDMDataProvider.class);
	when(
		ddmDataProviderInvokerImpl.getDDMDataProvider("2", optional)
	).thenReturn(
		ddmDataProvider
	);
	DDMDataProviderResponse.Builder responseBuilder =
		DDMDataProviderResponse.Builder.newBuilder();
	when(
		ddmDataProvider.getData(ddmDataProviderRequest)
	).thenReturn(
		responseBuilder.withOutput(
			"output", 2
		).build()
	);
	when(
		ddmDataProviderInvokerImpl.doInvoke(ddmDataProviderRequest)
	).thenCallRealMethod();
	DDMDataProviderResponse ddmDataProviderResponse =
		ddmDataProviderInvokerImpl.doInvoke(ddmDataProviderRequest);
	Optional<Number> outputOptional =
		ddmDataProviderResponse.getOutputOptional("output", Number.class);
	Assert.assertEquals(2, outputOptional.get());
}