### Question:
OkrBranchService { public OkrBranch create(OkrBranch okrBranch, User user) { OkrBranch entity = this.okrBranchRepository.save(okrBranch); logger.info("Created OkrBranch " + okrBranch.getName() + " (id: " + okrBranch.getId() + ")"); activityService.createActivity(user, okrBranch, Action.CREATED); return entity; } @Autowired  OkrBranchService(
      OkrBranchRepository okrBranchRepository, ActivityService activityService); OkrBranch findById(Long id); OkrBranch create(OkrBranch okrBranch, User user); OkrBranch update(long branchId, OkrBranch okrBranch, User user); void delete(Long id, User user);  }### Answer:
@Test public void create_expectEntitySaved() { when(okrBranchRepository.save(okrBranch)).thenReturn(okrBranch); OkrBranch actual = okrBranchService.create(okrBranch, mockedUser); Assert.assertEquals(okrBranch, actual); verify(okrBranchRepository).save(okrBranch); }