### Question:
LocationResult implements Parcelable { public static boolean hasResult(Intent intent) { return intent != null && intent.hasExtra(EXTRA_LOCATION_RESULT); } LocationResult(List<Location> locations); protected  LocationResult(Parcel in); static LocationResult create(List<Location> locations); @NonNull List<Location> getLocations(); Location getLastLocation(); static boolean hasResult(Intent intent); static LocationResult extractResult(Intent intent); @Override boolean equals(Object o); @Override int hashCode(); @Override void writeToParcel(Parcel dest, int flags); @Override int describeContents(); static final String EXTRA_LOCATION_RESULT; static final Creator<LocationResult> CREATOR; }### Answer:
@Test public void hasResult_shouldReturnFalseIfIntentIsNull() throws Exception { assertThat(LocationResult.hasResult(null)).isFalse(); }
@Test public void hasResult_shouldReturnFalseIfIntentDoesNotHaveExtra() throws Exception { assertThat(LocationResult.hasResult(new Intent())).isFalse(); }