### Question:
ResponseAvailableMaps extends Response { public static ResponseAvailableMaps from(Sc2Api.Response sc2ApiResponse) { if (!hasAvailableMapsResponse(sc2ApiResponse)) { throw new IllegalArgumentException("provided argument doesn't have available maps response"); } return new ResponseAvailableMaps( sc2ApiResponse.getAvailableMaps(), sc2ApiResponse.getStatus(), sc2ApiResponse.getId()); } private  ResponseAvailableMaps(
            Sc2Api.ResponseAvailableMaps sc2ApiResponseAvailableMaps, Sc2Api.Status sc2ApiStatus, int id); static ResponseAvailableMaps from(Sc2Api.Response sc2ApiResponse); Set<BattlenetMap> getBattlenetMaps(); Set<LocalMap> getLocalMaps(); @Override boolean equals(Object o); @Override boolean canEqual(Object other); @Override int hashCode(); @Override String toString();  }### Answer:
@Test void throwsExceptionWhenSc2ApiResponseDoesNotHaveAvailableMaps() { assertThatExceptionOfType(IllegalArgumentException.class) .isThrownBy(() -> ResponseAvailableMaps.from(nothing())) .withMessage("provided argument doesn't have available maps response"); assertThatExceptionOfType(IllegalArgumentException.class) .isThrownBy(() -> ResponseAvailableMaps.from(aSc2ApiResponse().build())) .withMessage("provided argument doesn't have available maps response"); }
@Test void hasEmptySetOfMapsForEmptySc2ApiResponseAvailableMaps() { ResponseAvailableMaps responseAvailableMaps = ResponseAvailableMaps.from(emptySc2ApiResponseWithAvailableMaps()); assertThatAllFieldsAreProperlyConverted( responseAvailableMaps, new ExpectedResponseData().withResponseStatus(GameStatus.QUIT)); }
@Test void convertsSc2ApiResponseAvailableMapsToResponseAvailableMaps() { ResponseAvailableMaps responseAvailableMaps = ResponseAvailableMaps.from(sc2ApiResponseWithAvailableMaps()); assertThatAllFieldsAreProperlyConverted( responseAvailableMaps, new ExpectedResponseData() .withResponseStatus(GameStatus.IN_GAME) .withBattlenetMapNames(BATTLENET_MAPS) .withLocalMapPaths(LOCAL_MAP_PATHS)); }