@@ -17,6 +17,7 @@ public class DocumentGatewayTest {
1717 private final String apiKey = System .getenv ("TWIKEY_API_KEY" ); // found in https://www.twikey.com/r/admin#/c/settings/api
1818
1919 private final String _ct = System .getenv ("CT" ); // found @ https://www.twikey.com/r/admin#/c/template
20+ private final String mndtNumber = System .getenv ("MNDTNUMBER" );
2021
2122 private Long ct ;
2223
@@ -84,9 +85,9 @@ public void testSignMandate() throws Exception, TwikeyClient.UserException {
8485 }
8586
8687 @ Test
87- public void testAction () throws IOException , TwikeyClient .UserException , InterruptedException {
88+ public void testAction () throws IOException , TwikeyClient .UserException {
8889 Assume .assumeTrue ("APIKey is set" , apiKey != null );
89- MandateActionRequest action = new MandateActionRequest (MandateActionRequest .MandateActionType .REMINDER , "CORERECURRENTNL18166" )
90+ MandateActionRequest action = new MandateActionRequest (MandateActionRequest .MandateActionType .REMINDER , mndtNumber )
9091 .setReminder (1 );
9192 api .document ().action (action );
9293 }
@@ -116,28 +117,28 @@ public void testCancel() throws Exception, TwikeyClient.UserException {
116117 @ Test
117118 public void testFetch () throws Exception , TwikeyClient .UserException {
118119 Assume .assumeTrue ("APIKey is set" , apiKey != null );
119- MandateDetailRequest fetch = new MandateDetailRequest ("CORERECURRENTNL18166" )
120+ MandateDetailRequest fetch = new MandateDetailRequest (mndtNumber )
120121 .setForce (true );
121122 DocumentResponse .Document response = api .document ().fetch (fetch );
122123 assertNotNull ("Document Reference" , response .getMandateNumber ());
123124 }
124125
125126 @ Test
126- public void testUpdateMandate () throws IOException , TwikeyClient .UserException , InterruptedException {
127+ public void testUpdateMandate () throws IOException , TwikeyClient .UserException {
127128 Assume .assumeTrue ("APIKey is set" , apiKey != null );
128- UpdateMandateRequest update = new UpdateMandateRequest ("CORERECURRENTNL18166" , customer , account );
129+ UpdateMandateRequest update = new UpdateMandateRequest (mndtNumber , customer , account );
129130 api .document ().update (update );
130131 }
131132
132133 @ Test
133- public void testCustomerAccess () throws IOException , TwikeyClient .UserException , InterruptedException {
134+ public void testCustomerAccess () throws IOException , TwikeyClient .UserException {
134135 Assume .assumeTrue ("APIKey is set" , apiKey != null );
135- DocumentResponse .CustomerAccessResponse response = api .document ().customerAccess ("CORERECURRENTNL18166" );
136+ DocumentResponse .CustomerAccessResponse response = api .document ().customerAccess (mndtNumber );
136137 assertNotNull ("Document Customer Url" , response .getUrl ());
137138 }
138139
139140 @ Test
140- public void testRetrievePdf () throws IOException , TwikeyClient .UserException , InterruptedException {
141+ public void testRetrievePdf () throws IOException , TwikeyClient .UserException {
141142 Assume .assumeTrue ("APIKey is set" , apiKey != null );
142143 DocumentResponse .PdfResponse retrievedPdf = api .document ().retrievePdf ("CORERECURRENTNL18247" );
143144 retrievedPdf .save ("target/pdf.pdf" );
0 commit comments