@Test
public void shouldUseExceptionMapper() {
final TenacityConfiguredBundle<Configuration> bundle = TenacityBundleBuilder
.newBuilder()
.configurationFactory(configurationFactory)
.addExceptionMapper(new TenacityExceptionMapper(429))
.build();
assertThat(bundle).
isEqualTo(new TenacityConfiguredBundle<>(
configurationFactory,
Optional.<HystrixCommandExecutionHook>absent(),
ImmutableList.<ExceptionMapper<? extends Throwable>>of(new TenacityExceptionMapper(429))
));
}