6
6
import static org .mockito .Mockito .when ;
7
7
8
8
import java .util .Arrays ;
9
+ import java .util .Collections ;
9
10
import java .util .List ;
10
11
import java .util .Optional ;
11
12
import org .junit .jupiter .api .DisplayName ;
@@ -36,13 +37,13 @@ class RoadMapServiceTest {
36
37
37
38
@ Test
38
39
@ DisplayName ("curriculumId가 주어지면 해당 커리큘럼의 키워드들을 전부 조회할 수 있다." )
39
- void findAllKeywords () throws Exception {
40
+ void findAllKeywords () {
40
41
//given
41
42
final Curriculum curriculum = new Curriculum (1L , "커리큘럼1" );
42
43
final Session session = new Session (1L , curriculum .getId (), "세션1" );
43
44
final List <Session > sessions = Arrays .asList (session );
44
- final Keyword keyword = Keyword . createKeyword ( "자바1" , "자바 설명1" , 1 , 5 , session .getId (),
45
- null );
45
+ final Keyword keyword = new Keyword ( 1L , "자바1" , "자바 설명1" , 1 , 5 , session .getId (),
46
+ null , Collections . emptySet () );
46
47
47
48
when (curriculumRepository .findById (anyLong ()))
48
49
.thenReturn (Optional .of (curriculum ));
@@ -53,7 +54,7 @@ void findAllKeywords() throws Exception {
53
54
when (keywordRepository .findBySessionIdIn (any ()))
54
55
.thenReturn (Arrays .asList (keyword ));
55
56
56
- final KeywordsResponse expected = KeywordsResponse .createResponse (Arrays .asList (keyword ));
57
+ final KeywordsResponse expected = KeywordsResponse .createResponseWithChildren (Arrays .asList (keyword ));
57
58
58
59
//when
59
60
final KeywordsResponse actual =
0 commit comments