@Test
public void shouldLookUpTheDataSourceUsingTheCorrectJndiName() throws Exception {

    final String dataSourceName = "java:/DS.framework";
    final DataSource dataSource = mock(DataSource.class);
    when(viewStoreDataSourceNameProvider.getDataSourceName()).thenReturn(dataSourceName);
    when(initialContext.lookup(dataSourceName)).thenReturn(dataSource);
    assertThat(viewStoreJdbcDataSourceProvider.getDataSource(), is(dataSource));
}