@Test
  public void distcpShouldNotBeCalledOnlyForOneFile() throws Exception {
    try (MockedStatic<UserGroupInformation> userGroupInformationMockedStatic = mockStatic(UserGroupInformation.class)) {
      userGroupInformationMockedStatic.when(UserGroupInformation::getCurrentUser).thenReturn(mock(UserGroupInformation.class));

      HiveConf conf = Mockito.spy(new HiveConf());
      doReturn(1L).when(conf).getLong(HiveConf.ConfVars.HIVE_EXEC_COPYFILE_MAXSIZE.varname, 32L * 1024 * 1024);
      CopyUtils copyUtils = new CopyUtils("", conf, null);
      long MB_128 = 128 * 1024 * 1024;
      assertFalse(copyUtils.limitReachedForLocalCopy(MB_128, 1L));
    }
  }
Unit Test class for CopyUtils class.
ql/src/test/org/apache/hadoop/hive/ql/parse/repl/TestCopyUtils.java