Connectivity { public static Connectivity create() { return builder().build(); } private  Connectivity(Builder builder); private  Connectivity(); static Connectivity create(); static Connectivity create(@NonNull Context context); NetworkInfo.State state(); static Builder state(NetworkInfo.State state); NetworkInfo.DetailedState detailedState(); static Builder state(NetworkInfo.DetailedState detailedState); int type(); static Builder type(int type); int subType(); static Builder subType(int subType); boolean available(); static Builder available(boolean available); boolean failover(); static Builder failover(boolean failover); boolean roaming(); static Builder roaming(boolean roaming); String typeName(); static Builder typeName(String typeName); String subTypeName(); static Builder subTypeName(String subTypeName); String reason(); static Builder reason(String reason); String extraInfo(); static Builder extraInfo(String extraInfo); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }
@Test(expected = IllegalArgumentException.class) public void createShouldThrowAnExceptionWhenContextIsNull() { final Context context = null; Connectivity.create(context); }