File tree Expand file tree Collapse file tree 1 file changed +35
-0
lines changed
lithic-java-core/src/test/kotlin/com/lithic/api/models Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change 22
33package com.lithic.api.models
44
5+ import com.lithic.api.core.http.Headers
56import kotlin.test.assertNotNull
67import org.assertj.core.api.Assertions.assertThat
78import org.junit.jupiter.api.Test
@@ -19,6 +20,40 @@ internal class FinancialAccountCreateParamsTest {
1920 .build()
2021 }
2122
23+ @Test
24+ fun headers () {
25+ val params =
26+ FinancialAccountCreateParams .builder()
27+ .idempotencyKey(" 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" )
28+ .nickname(" nickname" )
29+ .type(FinancialAccountCreateParams .Type .OPERATING )
30+ .accountToken(" 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" )
31+ .isForBenefitOf(true )
32+ .build()
33+
34+ val headers = params._headers ()
35+
36+ assertThat(headers)
37+ .isEqualTo(
38+ Headers .builder()
39+ .put(" Idempotency-Key" , " 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" )
40+ .build()
41+ )
42+ }
43+
44+ @Test
45+ fun headersWithoutOptionalFields () {
46+ val params =
47+ FinancialAccountCreateParams .builder()
48+ .nickname(" nickname" )
49+ .type(FinancialAccountCreateParams .Type .OPERATING )
50+ .build()
51+
52+ val headers = params._headers ()
53+
54+ assertThat(headers).isEqualTo(Headers .builder().build())
55+ }
56+
2257 @Test
2358 fun body () {
2459 val params =
You can’t perform that action at this time.
0 commit comments