### Question:
LocationEngineResult { @NonNull public static LocationEngineResult create(@Nullable Location location) { List<Location> locations = new ArrayList<>(); if (location != null) { locations.add(location); } return new LocationEngineResult(locations); } private  LocationEngineResult(List<Location> locations); @NonNull static LocationEngineResult create(@Nullable Location location); @NonNull static LocationEngineResult create(@Nullable List<Location> locations); @Nullable Location getLastLocation(); List<Location> getLocations(); @Nullable static LocationEngineResult extractResult(Intent intent);  }### Answer:
@Test public void passNullLocation() { Location location = null; LocationEngineResult result = LocationEngineResult.create(location); assertForNullInput(result); }
@Test public void passNullLocationList() { List<Location> locations = null; LocationEngineResult result = LocationEngineResult.create(locations); assertForNullInput(result); }
@Test public void passValidLocation() { Location location = getValidLocation(); LocationEngineResult result = LocationEngineResult.create(location); assertForValidInput(result); }
@Test public void passValidLocationList() { List<Location> locations = Collections.singletonList(getValidLocation()); LocationEngineResult result = LocationEngineResult.create(locations); assertForValidInput(result); }
@Test public void passMutableLocationListWithNulls() { List<Location> locations = getLocationsWithNulls(); LocationEngineResult result = LocationEngineResult.create(locations); assertForValidInput(result); }
@Test public void passImmutableLocationListWithNulls() { List<Location> locations = Collections.unmodifiableList(getLocationsWithNulls()); LocationEngineResult result = LocationEngineResult.create(locations); assertForValidInput(result); }