### Question:
FederatedRepositoryConnection implements RepositoryConnection { public String getSourceName() { return repository.getSourceName(); } FederatedRepositoryConnection( FederatedRepository repository,
                                   Observer observer ); CachePolicy getDefaultCachePolicy(); String getSourceName(); XAResource getXAResource(); boolean ping( long time,
                         TimeUnit unit ); void execute( ExecutionContext context,
                         final Request request ); void close();  }### Answer:
@Test public void shouldGetSourceNameFromRepository() { String name = "Something"; when(repository.getSourceName()).thenReturn(name); assertThat(connection.getSourceName(), is(name)); verify(repository, times(1)).getSourceName(); }