Skip to content

Commit fc1abd5

Browse files
Fix test
1 parent 7da2ecb commit fc1abd5

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

src/integrationTest/java/co/ipregistry/api/client/integration/IpregistryClientIntegrationTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ void testSingleLookupWithFilter() throws ApiException, ClientException {
7979
final IpregistryClient client = new IpregistryClient(apiKey);
8080
final IpInfo ipInfo = client.lookup("8.8.8.8", IpregistryOptions.filter("connection"));
8181

82-
Assertions.assertNull(ipInfo.getIp(), "8.8.8.8");
83-
Assertions.assertEquals(ipInfo.getType(), IpType.UNKNOWN);
82+
Assertions.assertNull(ipInfo.getIp());
83+
Assertions.assertEquals(IpType.UNKNOWN, ipInfo.getType());
8484
Assertions.assertNotNull(ipInfo.getConnection());
8585
Assertions.assertNotNull(ipInfo.getCurrency());
8686
Assertions.assertNull(ipInfo.getHostname());

src/main/java/co/ipregistry/api/client/model/IpInfo.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,14 @@ public class IpInfo {
4646
* This constructor is used for JSON deserialization and the Builder pattern.
4747
*/
4848
public IpInfo() {
49+
this.carrier = new Carrier();
50+
this.company = new Company();
51+
this.connection = new Connection();
52+
this.currency = new Currency();
53+
this.location = new Location();
54+
this.security = new Security();
55+
this.timeZone = new TimeZone();
56+
this.type = IpType.UNKNOWN;
4957
}
5058

5159
/**

0 commit comments

Comments
 (0)