expect(quotaManager.checkInstanceAddition(sanitized.getJobConfig().getTaskConfig(), 1))
.andReturn(NOT_ENOUGH_QUOTA);
control.replay();
assertResponse(INVALID_REQUEST, thrift.createJob(job.newBuilder(), DEFAULT_LOCK, SESSION));
}
private void assertMessageMatches(Response response, final String string) {
// TODO(wfarner): This test coverage could be much better. Circle back to apply more thorough
// response contents testing throughout.