String message = "testFailingProjectQuery-message";
ProjectInfoBuilder<?> builder = TestBuilders.failingProjectInfoBuilder(message);
BuilderResult result = fetchSingleProjectInfoWithError(connection, builder);
assertNotNull("Required result for FailingProjectInfoBuilder.", result);
BuilderIssue issue = result.getIssue();
assertNotNull("Required issue for FailingProjectInfoBuilder", issue);
assertEquals("Expected approriate builder name.", builder.getName(), issue.getName());
String issueMessage = issue.getException().getMessage();
if (!issueMessage.contains(message)) {
fail("Issue message is invalid: " + issueMessage);
}
}
});