def METHOD_NAME(testapp, biosample_data):
    bio = testapp.post_json('/biosample', biosample_data).json['@graph'][0]
    res = testapp.patch_json(
        bio['@id'],
        {'status': 'replaced', 'alternate_accessions': ['ENCFF123ABC']}, expect_errors=True)
    assert res.status_code == 422
    res = testapp.patch_json(
        bio['@id'],
        {'status': 'replaced', 'alternate_accessions': ['ENCBS123ABC']})
    assert res.status_code == 200