@Test
  public void updateNamedBlobNotAllowedTest() throws Exception {
    JSONObject headers = new JSONObject();
    FrontendRestRequestServiceTest.setAmbryHeadersForPut(headers, TestUtils.TTL_SECS, !REF_CONTAINER.isCacheable(),
        SERVICE_ID, CONTENT_TYPE, OWNER_ID, null, REF_CONTAINER_NO_UPDATE.getName(), null);
    headers.put(RestUtils.Headers.NAMED_UPSERT, true);
    byte[] content = TestUtils.getRandomBytes(1024);
    RestRequest request = getRestRequest(headers, request_noupdate_path, content);

    RestResponseChannel restResponseChannel = new MockRestResponseChannel();
    FutureResult<Void> future = new FutureResult<>();
    namedBlobPutHandler.handle(request, restResponseChannel, future::done);
    TestUtils.assertException(ExecutionException.class, () -> future.get(TIMEOUT_SECS, TimeUnit.SECONDS),
        restServiceExceptionChecker(RestServiceErrorCode.BadRequest));
  }
Do NOT allow upsert for container with NamedBlobMode = NO_UPDATE
ambry-frontend/src/test/java/com/github/ambry/frontend/NamedBlobPutHandlerTest.java