@Test
public void writeError_CustomReasonAndDomain() throws Exception {

  writeError(false, null, "badRequest", null, "global");
  writeError(true, null, "badRequest", null, "global");
  writeError(false, "", "badRequest", "", "global");
  writeError(true, "", "badRequest", "", "global");
  writeError(false, "customReason", "customReason", "customDomain", "customDomain");
  writeError(true, "customReason", "customReason", "customDomain", "customDomain");
}