@Test
public void shouldOnlyGenerateTheNameOnce() throws Exception {

    when(jndiAppNameProvider.getAppName()).thenReturn("framework");
    systemDataSourceNameProvider.getDataSourceName();
    systemDataSourceNameProvider.getDataSourceName();
    systemDataSourceNameProvider.getDataSourceName();
    systemDataSourceNameProvider.getDataSourceName();
    systemDataSourceNameProvider.getDataSourceName();
    systemDataSourceNameProvider.getDataSourceName();
    systemDataSourceNameProvider.getDataSourceName();
    verify(jndiAppNameProvider, times(1)).getAppName();
}