}
@Test
public void action_with_retry() throws Exception {
DataCollector collector = mock(DataCollector.class);
DataPoint expectedResult = mock(DataPoint.class);
when(collector.collect())
.thenThrow(new Exception("Ahh!!"))
.thenReturn(expectedResult);
Future compute = action.compute(collector);
assertEquals(expectedResult, compute.get());