### Question:
FederatedRepositoryConnection implements RepositoryConnection { public CachePolicy getDefaultCachePolicy() { return repository.getDefaultCachePolicy(); } 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 shouldGetDefaultCachePolicyFromRepository() { CachePolicy cachePolicy = mock(CachePolicy.class); when(repository.getDefaultCachePolicy()).thenReturn(cachePolicy); assertThat(connection.getDefaultCachePolicy(), is(cachePolicy)); verify(repository, times(1)).getDefaultCachePolicy(); }