@Test
  public void testUnitName() {
    unit1.setName(UNIT_NAME);
    unit2.setName(UNIT_NAME);

    int result = comparator.compare(unit1, unit2);
    assertEquals(0, result);
  }
  @Test
  public void testEmptyUnit2() {
    List<HealthcareType> healthcareTypes = new ArrayList<HealthcareType>();
    healthcareTypes.add(healthcareType1);
    unit1.setHealthcareTypes(healthcareTypes);

    int result = comparator.compare(unit1, unit2);
    assertEquals(-1, result);
  }
 @Test
 public void testEmptyUnits() {
   try {
     comparator.compare(unit1, unit2);
     fail("NullPointerException expected");
   } catch (NullPointerException e) {
     // Expected exception
   }
 }
  @Test
  public void testEmptyHealthcareTypes() {
    unit1.setHealthcareTypes(new ArrayList<HealthcareType>());
    unit2.setHealthcareTypes(new ArrayList<HealthcareType>());
    unit1.setName(UNIT_NAME);
    unit2.setName(UNIT_NAME);

    int result = comparator.compare(unit1, unit2);
    assertEquals(0, result);
  }