import org.springframework.retry.RetryContext;
public class ClassifierSimpleRetryPolicyTest {
@Test
public void test_classify() {
RetryContext context = Mockito.mock(RetryContext.class);
Classifier<Throwable, Boolean> classifier = Mockito.mock(Classifier.class);
ClassifierSimpleRetryPolicy policy = new ClassifierSimpleRetryPolicy(classifier);
Mockito.when(context.getLastThrowable()).thenReturn(new RuntimeException());
Mockito.when(classifier.classify(Mockito.any(Throwable.class))).thenReturn(true);
Assert.assertTrue(policy.canRetry(context));
Assert.assertSame(classifier, policy.getClassifier());
}