def METHOD_NAME(eo3_metadata, cover_z_dataset_type):
    """Test exceptions on invalid input."""
    dt = DatasetType(eo3_metadata, cover_z_dataset_type)
    # Unknown keys
    with pytest.raises(KeyError) as exc_info:
        dt.extra_dimensions[{"x": (5, 12)}]
    # For some reason the exception message has double quotes around it
    assert str(exc_info.value).strip('"') == "Found unknown keys {'x'} in dim_slices"
    # Bogus measurements_value
    with pytest.raises(ValueError) as exc_info:
        dt.extra_dimensions.measurements_values("x")
    assert str(exc_info.value) == "Dimension x not found."
    # Bogus measurements_slice
    with pytest.raises(ValueError) as exc_info:
        dt.extra_dimensions.measurements_slice("x")
    assert str(exc_info.value) == "Dimension x not found."
    # Bogus measurements_index
    with pytest.raises(ValueError) as exc_info:
        dt.extra_dimensions.measurements_index("x")
    assert str(exc_info.value) == "Dimension x not found."
    # Bogus measurements_index
    with pytest.raises(ValueError) as exc_info:
        dt.extra_dimensions.index_of("x", 50)
    assert str(exc_info.value) == "Dimension x not found."