@Test
public void testThrowException() throws Exception {

	DDMDataProviderRequest.Builder builder =
		DDMDataProviderRequest.Builder.newBuilder();
	DDMDataProviderRequest ddmDataProviderRequest = builder.withParameter(
		"dataProviderInstanceId", "1"
	).build();
	when(
		_ddmDataProviderInstanceService.getDataProviderInstance(1)
	).thenThrow(
		Exception.class
	);
	DDMDataProviderResponse ddmDataProviderResponse =
		_ddmDataProviderInstanceOutputParametersDataProvider.getData(
			ddmDataProviderRequest);
	Optional<List<KeyValuePair>> optional =
		ddmDataProviderResponse.getOutputOptional(
			"outputParameterNames", List.class);
	Assert.assertTrue(optional.isPresent());
	List<KeyValuePair> keyValuePairs = optional.get();
	Assert.assertEquals(keyValuePairs.toString(), 0, keyValuePairs.size());
}