@Test
  public void testGetFileCopyGetMetaDataResponseExpectSuccess() throws Exception {
    // Arrange: Mock successful metadata retrieval
    when(fileCopyInfo.getSourceReplicaId()).thenReturn(mock(ReplicaId.class));
    when(fileCopyInfo.getSourceReplicaId().getPartitionId()).thenReturn(mock(PartitionId.class));
    when(handler.getOperationRetryHandler().executeWithRetry(any(), anyString())).thenReturn(metadataResponse);

    // Act: Call getFileCopyGetMetaDataResponse
    FileCopyGetMetaDataResponse response = handler.getFileCopyGetMetaDataResponse(fileCopyInfo);

    // Assert: The response is not null and is the same as the metadataResponse
    assertNotNull(response);
    assertEquals(metadataResponse, response);
    verify(handler.getOperationRetryHandler(), times(1)).executeWithRetry(any(), anyString());
  }
Test the {@link StoreFileCopyHandler#getFileCopyGetMetaDataResponse(FileCopyInfo)} method.
The test verifies that the method returns the expected {@link FileCopyGetMetaDataResponse} object.
@throws Exception
ambry-file-transfer/src/test/java/com/github/ambry/filetransfer/handler/StoreFileCopyHandlerTest.java