### Question:
BbsArticleApiService { public Optional<BbsArticleEntity> get(Long articleId) { return bbsArticleRepository.findById(articleId); }  Page<BbsArticleEntity> page(Pageable pageable); Optional<BbsArticleEntity> get(Long articleId); void preAddArticle(BbsArticleEntity dbParam); @Transactional void addArticle(BbsArticleEntity dbParam); void preModifyArticle(BbsArticleEntity dbParam); @Transactional void modifyArticle(BbsArticleEntity dbParam);  }### Answer:
@Test public void getSuccessTest() { final Long articleId = 1L; final String title = "Test Title"; GIVEN: { BbsArticleEntity param = BbsArticleEntity.builder() .articleId(articleId) .title(title) .build(); given(bbsArticleRepository.findByArticleId(articleId)).willReturn(param); } Optional<BbsArticleEntity> optResult; WHEN: { optResult = bbsArticleApiService.get(articleId); } THEN: { Assert.assertTrue(optResult.isPresent()); BbsArticleEntity result = optResult.get(); Assert.assertEquals(result.getTitle(), title); } }