### Question:
BackupDelegator extends LifecycleAdapter { void copy( AdvertisedSocketAddress fromAddress, StoreId expectedStoreId, DatabaseLayout databaseLayout ) throws StoreCopyFailedException { remoteStore.copy( new CatchupAddressProvider.SingleAddressProvider( fromAddress ), expectedStoreId, databaseLayout, true ); } BackupDelegator( RemoteStore remoteStore, CatchUpClient catchUpClient, StoreCopyClient storeCopyClient ); @Override void start(); @Override void stop(); StoreId fetchStoreId( AdvertisedSocketAddress fromAddress );  }### Answer:
@Test public void retrieveStoreDelegatesToStoreCopyService() throws StoreCopyFailedException, CatchupAddressResolutionException { StoreId storeId = new StoreId( 92, 5, 7, 32 ); DatabaseLayout databaseLayout = DatabaseLayout.of( new File( "." ) ); subject.copy( anyAddress, storeId, databaseLayout ); ArgumentCaptor<CatchupAddressProvider> argumentCaptor = ArgumentCaptor.forClass( CatchupAddressProvider.class ); verify( remoteStore ).copy( argumentCaptor.capture(), eq( storeId ), eq( databaseLayout ), eq( true ) ); assertEquals( anyAddress, argumentCaptor.getValue().primary() ); }