### Question:
ConnectivityStateInfo { public static ConnectivityStateInfo forNonError(ConnectivityState state) { Preconditions.checkArgument( state != TRANSIENT_FAILURE, "state is TRANSIENT_ERROR. Use forError() instead"); return new ConnectivityStateInfo(state, Status.OK); } private  ConnectivityStateInfo(ConnectivityState state, Status status); static ConnectivityStateInfo forNonError(ConnectivityState state); static ConnectivityStateInfo forTransientFailure(Status error); ConnectivityState getState(); Status getStatus(); @Override boolean equals(Object other); @Override int hashCode(); @Override String toString();  }### Answer:
@Test public void forNonError() { ConnectivityStateInfo info = ConnectivityStateInfo.forNonError(IDLE); assertEquals(IDLE, info.getState()); assertEquals(Status.OK, info.getStatus()); }
@Test(expected = IllegalArgumentException.class) public void forNonErrorInvalid() { ConnectivityStateInfo.forNonError(TRANSIENT_FAILURE); }