diff --git a/src/main/java/com/bunq/sdk/context/SessionContext.java b/src/main/java/com/bunq/sdk/context/SessionContext.java index e704d5fd..d44b1f05 100644 --- a/src/main/java/com/bunq/sdk/context/SessionContext.java +++ b/src/main/java/com/bunq/sdk/context/SessionContext.java @@ -101,5 +101,5 @@ Date getExpiryTime() { public Integer getUserId() { return userId; } -} +} diff --git a/src/main/java/com/bunq/sdk/context/UserContext.java b/src/main/java/com/bunq/sdk/context/UserContext.java index d24439ba..3f67b0de 100644 --- a/src/main/java/com/bunq/sdk/context/UserContext.java +++ b/src/main/java/com/bunq/sdk/context/UserContext.java @@ -1,15 +1,12 @@ package com.bunq.sdk.context; import com.bunq.sdk.exception.BunqException; -import com.bunq.sdk.model.core.BunqModel; import com.bunq.sdk.model.core.UserContextHelper; import com.bunq.sdk.model.generated.endpoint.MonetaryAccountBank; import com.bunq.sdk.model.generated.endpoint.User; import com.bunq.sdk.model.generated.endpoint.UserCompany; import com.bunq.sdk.model.generated.endpoint.UserPerson; -import java.util.List; - public class UserContext { /** @@ -83,4 +80,5 @@ public UserCompany getUserCompany() { public MonetaryAccountBank getPrimaryMonetaryAccountBank() { return this.primaryMonetaryAccountBank; } + } diff --git a/src/main/java/com/bunq/sdk/model/core/UserContextHelper.java b/src/main/java/com/bunq/sdk/model/core/UserContextHelper.java index 665de6ca..e4dfabd2 100644 --- a/src/main/java/com/bunq/sdk/model/core/UserContextHelper.java +++ b/src/main/java/com/bunq/sdk/model/core/UserContextHelper.java @@ -51,14 +51,14 @@ public User getFirstUser() { public MonetaryAccountBank getFirstActiveMonetaryAccountBankByUserId(Integer userId) { BunqResponseRaw responseRaw = getRawResponse( - String.format(ENDPOINT_MONETARY_ACCOUNT_BANK, userId) + String.format(ENDPOINT_MONETARY_ACCOUNT_BANK, userId) ); String wrapper = MonetaryAccountBank.class.getSimpleName(); BunqResponse> response = fromJsonList( - MonetaryAccountBank.class, responseRaw, wrapper + MonetaryAccountBank.class, responseRaw, wrapper ); - for (MonetaryAccountBank monetaryAccountBank:response.getValue()) { + for (MonetaryAccountBank monetaryAccountBank : response.getValue()) { if (STATUS_ACTIVE.equals(monetaryAccountBank.getStatus())) { return monetaryAccountBank; } @@ -71,5 +71,5 @@ public MonetaryAccountBank getFirstActiveMonetaryAccountBankByUserId(Integer use public boolean isAllFieldNull() { return true; } -} +} diff --git a/src/test/java/com/bunq/sdk/context/UserContextTest.java b/src/test/java/com/bunq/sdk/context/UserContextTest.java index 198b3311..9312b79f 100644 --- a/src/test/java/com/bunq/sdk/context/UserContextTest.java +++ b/src/test/java/com/bunq/sdk/context/UserContextTest.java @@ -6,16 +6,15 @@ import static org.junit.Assert.assertNotNull; public class UserContextTest extends BunqSdkTestBase { - - @Test - public void buildUserContext() { - ApiContext context = getApiContext(); - UserContext userContext = new UserContext(context); + @Test + public void buildUserContext() { + ApiContext context = getApiContext(); - assertNotNull(userContext.getUserId()); - assertNotNull(userContext.getMainMonetaryAccountId()); - } -} + UserContext userContext = new UserContext(context); + assertNotNull(userContext.getUserId()); + assertNotNull(userContext.getMainMonetaryAccountId()); + } +}