public void setIsGooglePlayServicesAvailable(int availabilityCode) {
    this.availabilityCode = availabilityCode;
  }
@Test
  public void setIsGooglePlayServicesAvailable() {
    // Given an expected and injected ConnectionResult code
    final ShadowGoogleApiAvailability shadowGoogleApiAvailability =
        Shadows.shadowOf(GoogleApiAvailability.getInstance());
    final int expectedCode = ConnectionResult.SUCCESS;
    shadowGoogleApiAvailability.setIsGooglePlayServicesAvailable(expectedCode);

    // When getting the actual ConnectionResult code
    final int actualCode =
        GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(roboContext);

    // Then verify that we got back our expected code and not the default one.
    assertThat(actualCode).isEqualTo(expectedCode);
  }