private void doScheduleCompactionTest(PartitionId id, ServerErrorCode expectedServerErrorCode)
      throws InterruptedException, IOException {
    int correlationId = TestUtils.RANDOM.nextInt();
    String clientId = TestUtils.getRandomString(10);
    AdminRequest adminRequest =
        new AdminRequest(AdminRequestOrResponseType.TriggerCompaction, id, correlationId, clientId);
    Response response = sendRequestGetResponse(adminRequest, expectedServerErrorCode);
    assertTrue("Response not of type AdminResponse", response instanceof AdminResponse);
  }
Schedules a compaction for {@code id} and checks that the {@link ServerErrorCode} returned matches
{@code expectedServerErrorCode}.
@param id the {@link PartitionId} to schedule compaction for.
@param expectedServerErrorCode the {@link ServerErrorCode} expected when the request is processed.
@throws InterruptedException
@throws IOException
ambry-server/src/test/java/com/github/ambry/server/AmbryServerRequestsTest.java