11package com .maxmind .minfraud .response ;
22
33import com .fasterxml .jackson .jr .ob .JSON ;
4+ import com .maxmind .geoip2 .model .ConnectionTypeResponse .ConnectionType ;
45import org .junit .Test ;
56
67import static org .junit .Assert .*;
@@ -30,6 +31,7 @@ public void testIpAddress() throws Exception {
3031 .put ("local_time" , time )
3132 .end ()
3233 .startObjectField ("traits" )
34+ .put ("connection_type" , "Satellite" )
3335 .put ("ip_address" , "1.2.3.4" )
3436 .put ("is_anonymous" , true )
3537 .put ("is_anonymous_vpn" , true )
@@ -46,6 +48,7 @@ public void testIpAddress() throws Exception {
4648 assertEquals ("correct local time" , time , address .getLocation ().getLocalTime ());
4749 assertEquals ("1.2.0.0/16" , address .getTraits ().getNetwork ().toString ());
4850 assertTrue ("isHighRisk" , address .getCountry ().isHighRisk ());
51+ assertEquals ("getConnectionType" , ConnectionType .SATELLITE , address .getTraits ().getConnectionType ());
4952 assertTrue ("isAnonymous" , address .getTraits ().isAnonymous ());
5053 assertTrue ("isAnonymousVpn" , address .getTraits ().isAnonymousVpn ());
5154 assertTrue ("isHostingProvider" , address .getTraits ().isHostingProvider ());
@@ -66,4 +69,4 @@ public void testEmptyObject() throws Exception {
6669
6770 assertNotNull (address .getRiskReasons ());
6871 }
69- }
72+ }
0 commit comments