}
@JiraBuildNumberDependent(BN_JIRA_5)
@Test
public void testCreateIssueWithFieldValueThatIsNotAllowed() {
final IssueRestClient issueClient = client.getIssueClient();
final BasicPriority invalidPriority = new BasicPriority(null, 666L, "Invalid Priority");
thrown.expect(RestClientException.class);
thrown.expectMessage(String
.format("Invalid value '%s' passed for customfield 'My Radio buttons'. Allowed values are: 10000[abc], 10001[Another], 10002[The last option], -1", invalidPriority
.getId()));
final IssueInput issueInput = new IssueInputBuilder("TST", 1L, "Should fail")
.setFieldValue("customfield_10001", invalidPriority)
.build();
issueClient.createIssue(issueInput, pm);
}