diff --git a/src/main/java/com/exaroton/api/request/billing/pools/CreditPoolRequest.java b/src/main/java/com/exaroton/api/request/billing/pools/CreditPoolRequest.java index 90a87b7..a34b7ee 100644 --- a/src/main/java/com/exaroton/api/request/billing/pools/CreditPoolRequest.java +++ b/src/main/java/com/exaroton/api/request/billing/pools/CreditPoolRequest.java @@ -3,13 +3,14 @@ import com.exaroton.api.APIRequest; import com.exaroton.api.ExarotonClient; import com.exaroton.api.billing.pools.CreditPool; +import org.jetbrains.annotations.NotNull; import java.util.HashMap; public abstract class CreditPoolRequest extends APIRequest { private final String poolId; - public CreditPoolRequest(ExarotonClient client, String id) { + public CreditPoolRequest(@NotNull ExarotonClient client, @NotNull String id) { super(client); this.poolId = id; } diff --git a/src/test/java/APIClientTest.java b/src/test/java/APIClientTest.java index bae00ef..c5d0bc1 100644 --- a/src/test/java/APIClientTest.java +++ b/src/test/java/APIClientTest.java @@ -1,8 +1,9 @@ import com.exaroton.api.ExarotonClient; import com.exaroton.api.server.Server; +import org.jetbrains.annotations.NotNull; public abstract class APIClientTest { - protected static final String TEST_SERVER_ID = System.getenv("EXAROTON_TEST_SERVER"); - protected final ExarotonClient client = new ExarotonClient(System.getenv("EXAROTON_API_TOKEN")); - protected final Server server = client.getServer(TEST_SERVER_ID); + protected static final @NotNull String TEST_SERVER_ID = System.getenv("EXAROTON_TEST_SERVER"); + protected final @NotNull ExarotonClient client = new ExarotonClient(System.getenv("EXAROTON_API_TOKEN")); + protected final @NotNull Server server = client.getServer(TEST_SERVER_ID); } diff --git a/src/test/java/CreditPoolsTest.java b/src/test/java/CreditPoolsTest.java index 224f5ec..905062c 100644 --- a/src/test/java/CreditPoolsTest.java +++ b/src/test/java/CreditPoolsTest.java @@ -2,6 +2,7 @@ import com.exaroton.api.billing.pools.CreditPool; import com.exaroton.api.billing.pools.CreditPoolMember; import com.exaroton.api.server.Server; +import org.jetbrains.annotations.NotNull; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; @@ -9,7 +10,7 @@ import java.util.Optional; public class CreditPoolsTest extends APIClientTest { - private static final String TEST_POOL_ID = System.getenv("EXAROTON_TEST_POOL"); + private static final @NotNull String TEST_POOL_ID = System.getenv("EXAROTON_TEST_POOL"); @Test public void testGetCreditPools() throws APIException {