@Test public void testExecuteNoExeception() throws Exception { AbstractTestDataEntity entity = mock(AbstractTestDataEntity.class); when(entity.getException()).thenReturn(null); assertNull(new ExtractScreenshotFunction(converter).execute(Collections.singletonList(entity))); verify(converter).convert(any()); }
@Override protected Object execute(List<Object> arguments) { return Optional.ofNullable((AbstractTestDataEntity) arguments.get(0)) .map(entity -> screenshotDivConverter.convert(entity.getException())) .orElse(null); }
ExtractScreenshotFunction extends AbstractFunction { @Override protected Object execute(List<Object> arguments) { return Optional.ofNullable((AbstractTestDataEntity) arguments.get(0)) .map(entity -> screenshotDivConverter.convert(entity.getException())) .orElse(null); } }
ExtractScreenshotFunction extends AbstractFunction { @Override protected Object execute(List<Object> arguments) { return Optional.ofNullable((AbstractTestDataEntity) arguments.get(0)) .map(entity -> screenshotDivConverter.convert(entity.getException())) .orElse(null); } ExtractScreenshotFunction(ScreenshotDivConverter screenshotDivConverter); }
ExtractScreenshotFunction extends AbstractFunction { @Override protected Object execute(List<Object> arguments) { return Optional.ofNullable((AbstractTestDataEntity) arguments.get(0)) .map(entity -> screenshotDivConverter.convert(entity.getException())) .orElse(null); } ExtractScreenshotFunction(ScreenshotDivConverter screenshotDivConverter); @Override String name(); }
ExtractScreenshotFunction extends AbstractFunction { @Override protected Object execute(List<Object> arguments) { return Optional.ofNullable((AbstractTestDataEntity) arguments.get(0)) .map(entity -> screenshotDivConverter.convert(entity.getException())) .orElse(null); } ExtractScreenshotFunction(ScreenshotDivConverter screenshotDivConverter); @Override String name();  }