### Question:
ConnectivityStateInfo { public static ConnectivityStateInfo forTransientFailure(Status error) { Preconditions.checkArgument(!error.isOk(), "The error status must not be OK"); return new ConnectivityStateInfo(TRANSIENT_FAILURE, error); } 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 forTransientFailure() { ConnectivityStateInfo info = ConnectivityStateInfo.forTransientFailure(Status.UNAVAILABLE); assertEquals(TRANSIENT_FAILURE, info.getState()); assertEquals(Status.UNAVAILABLE, info.getStatus()); }
@Test(expected = IllegalArgumentException.class) public void forTransientFailureInvalid() { ConnectivityStateInfo.forTransientFailure(Status.OK); }