@Test
public void testGetDataProvider() throws Exception
{

    DataProvider dataProvider = new DataProvider(DATA_PROVIDER_NAME);
    DataProviderKey dataProviderKey = new DataProviderKey(DATA_PROVIDER_NAME);
    when(dataProviderService.getDataProvider(dataProviderKey)).thenReturn(dataProvider);
    // Retrieve the data provider.
    DataProvider resultDataProvider = dataProviderRestController.getDataProvider(DATA_PROVIDER_NAME);
    // Verify the external calls.
    verify(dataProviderService).getDataProvider(dataProviderKey);
    verifyNoMoreInteractions(dataProviderService);
    // Validate the returned object.
    assertEquals(dataProvider, resultDataProvider);
}