@Override
    public UpdateFeaturesResponse getErrorResponse(int throttleTimeMs, Throwable e) {
        return UpdateFeaturesResponse.createWithErrors(
            ApiError.fromThrowable(e),
            Collections.emptyMap(),
            throttleTimeMs
        );
    }
@Test
    public void testGetErrorResponse() {
        UpdateFeaturesRequestData.FeatureUpdateKeyCollection features =
            new UpdateFeaturesRequestData.FeatureUpdateKeyCollection();

        features.add(new UpdateFeaturesRequestData.FeatureUpdateKey()
            .setFeature("foo")
            .setMaxVersionLevel((short) 2)
        );

        features.add(new UpdateFeaturesRequestData.FeatureUpdateKey()
            .setFeature("bar")
            .setMaxVersionLevel((short) 3)
        );

        UpdateFeaturesRequest request = new UpdateFeaturesRequest(
            new UpdateFeaturesRequestData().setFeatureUpdates(features),
            UpdateFeaturesRequestData.HIGHEST_SUPPORTED_VERSION
        );

        UpdateFeaturesResponse response = request.getErrorResponse(0, new UnknownServerException());
        assertEquals(Errors.UNKNOWN_SERVER_ERROR, response.topLevelError().error());
        assertEquals(0, response.data().results().size());
        assertEquals(Collections.singletonMap(Errors.UNKNOWN_SERVER_ERROR, 1), response.errorCounts());
    }