### Question:
StrategyResolverService { List<BackupStrategyWrapper> getStrategies( SelectedBackupProtocol selectedBackupProtocol ) { switch ( selectedBackupProtocol ) { case ANY: return Arrays.asList( ccBackupStrategy, haBackupStrategy ); case COMMON: return Collections.singletonList( haBackupStrategy ); case CATCHUP: return Collections.singletonList( ccBackupStrategy ); default: throw new IllegalArgumentException( "Unhandled protocol choice: " + selectedBackupProtocol ); } } StrategyResolverService( BackupStrategyWrapper haBackupStrategy, BackupStrategyWrapper ccBackupStrategy );   }### Answer:
@Test public void anyProvidesBothStrategiesCorrectOrder() { List<BackupStrategyWrapper> result = subject.getStrategies( SelectedBackupProtocol.ANY ); assertEquals( Arrays.asList( ccBackupStrategy, haBackupStrategy ), result ); }
@Test public void legacyProvidesBackupProtocol() { List<BackupStrategyWrapper> result = subject.getStrategies( SelectedBackupProtocol.COMMON ); assertEquals( Collections.singletonList( haBackupStrategy ), result ); }
@Test public void catchupProvidesTransactionProtocol() { List<BackupStrategyWrapper> result = subject.getStrategies( SelectedBackupProtocol.CATCHUP ); assertEquals( Collections.singletonList( ccBackupStrategy ), result ); }