@@ -173,6 +173,30 @@ class NylasClientTest {
173173 val result = nylasClient.webhooks()
174174 assertNotNull(result)
175175 }
176+
177+ @Test
178+ fun `grants returns a valid Grants instance` () {
179+ val result = nylasClient.grants()
180+ assertNotNull(result)
181+ }
182+
183+ @Test
184+ fun `contacts returns a valid Contacts instance` () {
185+ val result = nylasClient.contacts()
186+ assertNotNull(result)
187+ }
188+
189+ @Test
190+ fun `scheduler returns a valid Scheduler instance` () {
191+ val result = nylasClient.scheduler()
192+ assertNotNull(result)
193+ }
194+
195+ @Test
196+ fun `notetakers returns a valid Notetakers instance` () {
197+ val result = nylasClient.notetakers()
198+ assertNotNull(result)
199+ }
176200 }
177201
178202 @Nested
@@ -407,6 +431,30 @@ class NylasClientTest {
407431 assertEquals(capturedRequest.method, " GET" )
408432 }
409433
434+ @Test
435+ fun `executeGet should handle Double query parameters correctly` () {
436+ val mockQueryParams: IQueryParams = mock()
437+ whenever(mockQueryParams.convertToMap()).thenReturn(
438+ mapOf (
439+ " doubleValue" to 3.14 ,
440+ " anotherDouble" to 2.5 ,
441+ ),
442+ )
443+ whenever(mockResponseBody.source()).thenReturn(Buffer ().writeUtf8(" { \" foo\" : \" bar\" }" ))
444+ nylasClient.executeGet<Map <String , String >>(
445+ " test/path" ,
446+ JsonHelper .mapTypeOf(String ::class .java, String ::class .java),
447+ mockQueryParams,
448+ )
449+
450+ val requestCaptor = argumentCaptor<Request >()
451+ verify(mockHttpClient).newCall(requestCaptor.capture())
452+ val capturedRequest = requestCaptor.firstValue
453+
454+ assertEquals(capturedRequest.url.toString(), " https://api.us.nylas.com/test/path?doubleValue=3&anotherDouble=2" )
455+ assertEquals(capturedRequest.method, " GET" )
456+ }
457+
410458 @Test
411459 fun `executePut should set up the request with the correct params` () {
412460 val putBody = " { \" test\" : \" updated\" }"
0 commit comments