@Test public void findByNameTest() { when(photoRepo.findByName("test")).thenReturn(Optional.of(new Photo())); assertEquals(Optional.of(new Photo()), photoService.findByName("test")); }
@Override public Optional<Photo> findByName(String name) { return photoRepo.findByName(name); }
PhotoServiceImpl implements PhotoService { @Override public Optional<Photo> findByName(String name) { return photoRepo.findByName(name); } }
PhotoServiceImpl implements PhotoService { @Override public Optional<Photo> findByName(String name) { return photoRepo.findByName(name); }  }
PhotoServiceImpl implements PhotoService { @Override public Optional<Photo> findByName(String name) { return photoRepo.findByName(name); }  @Override Optional<Photo> findByName(String name); }
PhotoServiceImpl implements PhotoService { @Override public Optional<Photo> findByName(String name) { return photoRepo.findByName(name); }  @Override Optional<Photo> findByName(String name);  }