content: /*
   * This file was automatically generated by UTestGen and EvoSuite
   * Mon Feb 12 21:32:52 GMT 2024
   */
  
  package de.outstare.fortbattleplayer.model.impl;
  
  import org.junit.jupiter.api.Test;
  import static org.junit.jupiter.api.Assertions.*;
  import org.junit.jupiter.api.Timeout;
  import java.util.concurrent.TimeUnit;
  
  import org.evosuite.runtime.EvoRunner;
  import org.evosuite.runtime.EvoRunnerParameters;
  import org.junit.runner.RunWith;
  
  @RunWith(EvoRunner.class)
  @EvoRunnerParameters(
      mockJVMNonDeterminism = true,
      useVFS = true,
      useVNET = true,
      resetStaticState = true,
      separateClassLoader = true)
  public class JSWeaponData_ESTest extends JSWeaponData_ESTest_scaffolding {
  
    @Test
    @Timeout(value = 4000, unit = TimeUnit.MILLISECONDS)
    public void testToStringMethod() throws Throwable {
      // Given the JSWeaponData.WeaponGameData object with the following parameters:
      JSWeaponData.WeaponGameData jSWeaponData_WeaponGameData =
          new JSWeaponData.WeaponGameData(1915, (-3140), (-3140), 25, 1915, "g7*W!u!NX3_YR/Xq");
  
      // When the toString() method is called on the object
      String string = jSWeaponData_WeaponGameData.toString();
  
      // Then the returned string should be a well-formatted and meaningful representation of the
      // WeaponGameData object, including all relevant information such as the minimum damage, maximum
      // damage, bonus to attacking speed, bonus to defending speed, name, etc.
      assertEquals(
          "WeaponGameData: minDmg=-3140, maxDmg=-3140, offBonus=25, deffBonus=1915, name=g7*W!u!NX3_YR/Xq",
          string);
    }
  
    @Test
    @Timeout(value = 4000, unit = TimeUnit.MILLISECONDS)
    public void testEqualityOfTwoJSWeaponDataObjects() throws Throwable {
      // Arrange
      JSWeaponData.WeaponGameData weaponData1 =
          new JSWeaponData.WeaponGameData(136, 136, 136, 136, 136,
                  "de.outstare.fortbattleplayer.model.impl.JSWeaponData$WeaponGameData");
      JSWeaponData.WeaponGameData weaponData2 =
          new JSWeaponData.WeaponGameData(136, 136, 136, 136, 136,
                  "de.outstare.fortbattleplayer.model.impl.JSWeaponData$WeaponGameData");
  
      // Act
      boolean result = weaponData1.equals(weaponData2);
  
      // Assert
      assertTrue(result);
    }
  
    @Test
    @Timeout(value = 4000, unit = TimeUnit.MILLISECONDS)
    public void testEqualsAndToString() throws Throwable {
      JSWeaponData.WeaponGameData jSWeaponData_WeaponGameData =
          new JSWeaponData.WeaponGameData(3465, 3465, 3465, 3465, 3465, (String) null);
      // Given a JSWeaponData.WeaponGameData object with specific values for minDmg, maxDmg, offBonus, deffBonus, and name
      JSWeaponData.WeaponGameData arg0 =
          new JSWeaponData.WeaponGameData(3465, 3465, 3465, 3465, 3465, (String) null);
  
      // When comparing the given object to another object with the same values
      boolean equals = jSWeaponData_WeaponGameData.equals(arg0);
  
      // Then assert that the objects are equal and have the expected string representation
      assertTrue(equals);
      assertEquals(
          "WeaponGameData: minDmg=3465, maxDmg=3465, offBonus=3465, deffBonus=3465, name=null",
          arg0.toString());
    }
  
    @Test
    @Timeout(value = 4000, unit = TimeUnit.MILLISECONDS)
    public void testEqualityOfWeaponGameDataObjects() throws Throwable {
      // No Comments were added
      JSWeaponData.WeaponGameData jSWeaponData_WeaponGameData =
          new JSWeaponData.WeaponGameData(126, 126, 126, 126, 126, (String) null);
      JSWeaponData.WeaponGameData arg0 =
          new JSWeaponData.WeaponGameData(126, 126, 126, 126, 126,
              "de.outstare.fortbattleplayer.model.impl.JSWeaponData$WeaponGameData");
      boolean equals = jSWeaponData_WeaponGameData.equals(arg0);
      assertFalse(arg0.equals((Object) jSWeaponData_WeaponGameData));
      assertFalse(equals);
      assertEquals(
          "WeaponGameData: minDmg=126, maxDmg=126, offBonus=126, deffBonus=126, name=de.outstare.fortbattleplayer.model.impl.JSWeaponData$WeaponGameData",
          arg0.toString());
    }
  
    @Test
    @Timeout(value = 4000, unit = TimeUnit.MILLISECONDS)
    public void testEqualsWithDefaultAndCustomValues() throws Throwable {
      // Create a new WeaponGameData instance with default values
      JSWeaponData.WeaponGameData jSWeaponData_WeaponGameData =
          new JSWeaponData.WeaponGameData(17, 17, 106, 17, 17,
              "de.outstare.fortbattleplayer.model.impl.JSWeaponData$WeaponGameData");
  
      // Create a new WeaponGameData instance with custom values
      JSWeaponData.WeaponGameData arg0 =
          new JSWeaponData.WeaponGameData(17, 106, 106, 17, 17,
              "de.outstare.fortbattleplayer.model.impl.JSWeaponData$WeaponGameData");
  
      // Test the equals() method with the default WeaponGameData instance
      boolean equals = jSWeaponData_WeaponGameData.equals(arg0);
      assertFalse(equals, "The two instances should not be equal");
  
      // Test the toString() method of both instances
      assertEquals(
          "WeaponGameData: minDmg=17, maxDmg=106, offBonus=17, deffBonus=17, name=de.outstare.fortbattleplayer.model.impl.JSWeaponData$WeaponGameData",
          jSWeaponData_WeaponGameData.toString());
      assertEquals(
          "WeaponGameData: minDmg=106, maxDmg=106, offBonus=17, deffBonus=17, name=de.outstare.fortbattleplayer.model.impl.JSWeaponData$WeaponGameData",
          arg0.toString());
    }
  
    @Test
    @Timeout(value = 4000, unit = TimeUnit.MILLISECONDS)
    public void testWeaponGameDataEquals() throws Throwable {
      // Create two JSWeaponData.WeaponGameData instances with different min and max damage values
      JSWeaponData.WeaponGameData jSWeaponData_WeaponGameData =
          new JSWeaponData.WeaponGameData(
              106, 106, 118, 106, 106,
              "de.outstare.fortbattleplayer.model.impl.JSWeaponData$WeaponGameData");
      JSWeaponData.WeaponGameData arg0 =
          new JSWeaponData.WeaponGameData(
              107, 106, 106, 106, 106,
              "de.outstare.fortbattleplayer.model.impl.JSWeaponData$WeaponGameData");
  
      // Check that the instances are not equal
      assertFalse(jSWeaponData_WeaponGameData.equals(arg0));
  
      // Assert that the instances have different toString representations
      assertNotEquals(jSWeaponData_WeaponGameData.toString(), arg0.toString());
  //    assertNotEquals(
  //        "WeaponGameData: minDmg=106, maxDmg=118, offBonus=106, deffBonus=106, name=de.outstare.fortbattleplayer.model.impl.JSWeaponData$WeaponGameData",
  //        jSWeaponData_WeaponGameData.toString());
  //    assertNotEquals(
  //        "WeaponGameData: minDmg=107, maxDmg=106, offBonus=106, deffBonus=106, name=de.outstare.fortbattleplayer.model.impl.JSWeaponData$WeaponGameData",
  //        arg0.toString());
  
      // Assert that the instances have different hash codes
      assertNotEquals(jSWeaponData_WeaponGameData.hashCode(), arg0.hashCode());
    }
  
    @Test
    @Timeout(value = 4000, unit = TimeUnit.MILLISECONDS)
    public void testEqualsDifferentMinDmgValues() throws Throwable {
      // Given: We have two instances of JSWeaponData.WeaponGameData with different values for minDmg
      JSWeaponData.WeaponGameData defaultWeapon =
              new JSWeaponData.WeaponGameData(35, 35, 35, 35, 35, "Ninja Sword");
      JSWeaponData.WeaponGameData customWeapon =
              new JSWeaponData.WeaponGameData(35, 17, 35, 35, 35, "Ninja Sword");
  
      // When: We call equals() method on the two instances with the default WeaponGameData instance
      boolean equals = defaultWeapon.equals(customWeapon);
  
      // Then: The result of equals is false, since the two instances have different values for minDmg
      assertFalse(equals, "The two instances should not be equal");
  
      // And: The toString method on the second instance returns a string with the correct values for minDmg, maxDmg, offBonus, deffBonus, and name
      assertEquals(
              "WeaponGameData: minDmg=35, maxDmg=35, offBonus=35, deffBonus=35, name=Ninja Sword", defaultWeapon.toString());
      assertEquals(
              "WeaponGameData: minDmg=35, maxDmg=17, offBonus=35, deffBonus=35, name=Ninja Sword", customWeapon.toString());
    }
  
    @Test
    @Timeout(value = 4000, unit = TimeUnit.MILLISECONDS)
    public void testWeaponDataEqualityIsNotReflexive() throws Throwable {
      // Given
      JSWeaponData.WeaponGameData weaponData1 =
          new JSWeaponData.WeaponGameData(2530, 106, 106, (-2533), 3, "F?:WMFV%E8.3gop>");
      JSWeaponData.WeaponGameData weaponData2 =
          new JSWeaponData.WeaponGameData(3728, 3728, 1, (-1), 3, "*G[&nWT*WDeSqY'");
  
      // When
      boolean areEqual = weaponData1.equals(weaponData2);
  
      // Then
      assertFalse(areEqual);
    }
  
    @Test
    @Timeout(value = 4000, unit = TimeUnit.MILLISECONDS)
    public void testEqualsDifferentValues() throws Throwable {
      // Given two instances of the same weapon data with different values for some fields
      JSWeaponData.WeaponGameData jSWeaponData_WeaponGameData =
          new JSWeaponData.WeaponGameData(31, 50, 127, (-1245), (-2100799218), (String) null);
      JSWeaponData.WeaponGameData arg0 =
          new JSWeaponData.WeaponGameData(127, 127, (-3533), 1499, (-3533),
              "de.outstare.fortbattleplayer.model.impl.JSWeaponData");
      // When the equals method is called on these instances with one of them as an argument
      boolean equals = jSWeaponData_WeaponGameData.equals(arg0);
  
      // Then assert that these instances are not equal
      assertFalse(equals);
  
      // And assert that the toString method returns a string representation of the weapon data with
      // the correct values for all fields
      assertEquals(
          "WeaponGameData: minDmg=50, maxDmg=127, offBonus=-1245, deffBonus=-2100799218, name=null",
          jSWeaponData_WeaponGameData.toString());
      assertEquals(
          "WeaponGameData: minDmg=127, maxDmg=-3533, offBonus=1499, deffBonus=-3533, name=de.outstare.fortbattleplayer.model.impl.JSWeaponData",
          arg0.toString());
    }
  
    @Test
    @Timeout(value = 4000, unit = TimeUnit.MILLISECONDS)
    public void testEqualsDifferentObjectNotEqual() throws Throwable {
      JSWeaponData.WeaponGameData jSWeaponData_WeaponGameData =
          new JSWeaponData.WeaponGameData(126, 126, 126, 126, 126, null);
      Object arg0 = new Object();
      // Test the equals() method with a different object that is not equal to
      // jSWeaponData_WeaponGameData
      boolean equals = jSWeaponData_WeaponGameData.equals(arg0);
      assertFalse(equals, "The objects should not be equal");
    }
  
    @Test
    @Timeout(value = 4000, unit = TimeUnit.MILLISECONDS)
    public void testNotEqualsWithDifferentNames() throws Throwable {
      JSWeaponData.WeaponGameData arg0 =
          new JSWeaponData.WeaponGameData(-1, -1, -1, -1, -1, "H.lfz<9SF|_!2");
      JSWeaponData.WeaponGameData jSWeaponData_WeaponGameData =
          new JSWeaponData.WeaponGameData(-1, -1, -1, -1, -1, "13},4',15{,0,0,Tod S*nse");
      boolean equals = jSWeaponData_WeaponGameData.equals(arg0);
      // Test that the weapon data objects are not equal
      assertFalse(equals);
  
      // Test that the weapon data objects have different names
      String arg0Name = arg0.name;
      String jSWeaponData_WeaponGameDataName = jSWeaponData_WeaponGameData.name;
      assertNotEquals(arg0Name, jSWeaponData_WeaponGameDataName);
    }
  
    @Test
    @Timeout(value = 4000, unit = TimeUnit.MILLISECONDS)
    public void testWeaponEqualsSelf() throws Throwable {
      JSWeaponData.WeaponGameData testWeapon =
          new JSWeaponData.WeaponGameData(
              818, (-3533), 152, 152, 2,
              "Nachbedingung nicht erfüllt: _maxDamage >= _minDamage");
      // Given a weapon with the following properties:
      // - ID is 818
      // - Min damage is -3533
      // - Max damage is 152
      // - Offense bonus is 152
      // - Defense bonus is 2
      // - Name is "Nachbedingung nicht erf\u00FCllt: _maxDamage >= _minDamage"
      boolean equals = testWeapon.equals(testWeapon);
      assertTrue(equals);
      // When the weapon's properties are compared to itself using the "equals" method
      // Then the result should be true, as the weapon is equal to itself
      assertEquals(
          "WeaponGameData: minDmg=-3533, maxDmg=152, offBonus=152, deffBonus=2, name=Nachbedingung nicht erf\u00FCllt: _maxDamage >= _minDamage",
          testWeapon.toString());
      // And the weapon's toString() method should return a string representation of its properties in
      // the format "WeaponGameData: minDmg=<min damage>, maxDmg=<max damage>, offBonus=<offense
      // bonus>, deffBonus=<defense bonus>, name=<name>"
    }
  
    @Test
    @Timeout(value = 4000, unit = TimeUnit.MILLISECONDS)
    public void testHasBonusWithNegativeRatings() throws Throwable {
      // Given a weapon with attack rating 118 and defense rating 118
      SimpleWeapon weapon = new SimpleWeapon(118, "e", 118, 118);
  
      // And a JSWeaponData object that has no bonuses for weapons with attack rating -150 or defense
      // rating -150
      JSWeaponData weaponData = new JSWeaponData();
  
      // When checking if the weapon has a bonus based on its attack and defense ratings
      boolean hasBonus = weaponData.hasBonus(weapon, (-150), (-150));
  
      // Then the method should return false since the weapon does not have a bonus for attack rating
      // -150 or defense rating -150
      assertFalse(hasBonus);
    }
  
    @Test
    @Timeout(value = 4000, unit = TimeUnit.MILLISECONDS)
    public void testHasBonusWithNegativeLevels() throws Throwable {
      // No Comments were added
      SimpleWeapon arg0 = new SimpleWeapon(118, "_Lv'EaV,zz\"f7ri", 118, 118);
      JSWeaponData jSWeaponData = new JSWeaponData();
      boolean bonus = jSWeaponData.hasBonus(arg0, (-50), (-150));
      assertTrue(bonus);
    }
  
    @Test
    @Timeout(value = 4000, unit = TimeUnit.MILLISECONDS)
    public void testIsNotGoldenGun() throws Throwable {
      // No Comments were added
      SimpleWeapon arg0 = new SimpleWeapon(118, "_Lv'EaV,zz\"f7ri", 118, 118);
      JSWeaponData jSWeaponData = new JSWeaponData();
      boolean goldenGun = jSWeaponData.isGoldenGun(arg0);
      assertFalse(goldenGun);
    }
  
    @Test
    @Timeout(value = 4000, unit = TimeUnit.MILLISECONDS)
    public void testIsGoldenGunSimpleWeaponReturnsTrue() throws Throwable {
      // Given: A JSWeaponData instance and a SimpleWeapon with an ID of 136 and the name "The Golden Gun"
      JSWeaponData jSWeaponData = new JSWeaponData();
      SimpleWeapon arg0 = new SimpleWeapon(136, "The Golden Gun", 3, 17);
  
      // When: The isGoldenGun method is called with the SimpleWeapon as an argument
      boolean goldenGun = jSWeaponData.isGoldenGun(arg0);
  
      // Then: The method should return true
      assertTrue(goldenGun);
    }
  
    @Test
    @Timeout(value = 4000, unit = TimeUnit.MILLISECONDS)
    public void testGetSectorBonusDamageWithInvalidInput() throws Throwable {
      // Create a new SimpleWeapon with invalid input
  //    assertThrows(IllegalArgumentException, new SimpleWeapon(-1, "`J!>Hm0RK8>O%N", -1, -2));
  
      // Call the getSectorBonusDamage method and store the result
  //    int sectorBonusDamage = simpleWeapon.getSectorBonusDamage();
  //
  //    // Assert that the result is 0
  //    assertEquals(0, sectorBonusDamage);
    }
  
    @Test
    @Timeout(value = 4000, unit = TimeUnit.MILLISECONDS)
    public void testHasHipFlaskReturnsFalseWhenNoHipFlask() throws Throwable {
      // Create a new JSWeaponData and SimpleWeapon objects
      JSWeaponData jSWeaponData = new JSWeaponData();
      SimpleWeapon arg0 = new SimpleWeapon(126,
              "de.outstare.fortbattleplayer.model.impl.JSWeaponData$WeaponGameData", 2, 126);
  
      // Call the hasHipFlask method with the created objects as arguments
      boolean hipFlask = jSWeaponData.hasHipFlask(arg0);
  
      // Assert that the returned value is false
      assertFalse(hipFlask);
    }
  
    @Test
    @Timeout(value = 4000, unit = TimeUnit.MILLISECONDS)
    public void testHasBayonetWhenNoBayonet() throws Throwable {
      // Given a SimpleWeapon with ID 126 and name "UV"
      JSWeaponData jSWeaponData = new JSWeaponData();
      SimpleWeapon arg0 = new SimpleWeapon(126, "UV", 126, 126);
  
      // When checking if the weapon has a bayonet
      boolean bayonet = jSWeaponData.hasBayonet(arg0);
  
      // Then the result should be false
      assertFalse(bayonet);
    }
  
    @Test
    @Timeout(value = 4000, unit = TimeUnit.MILLISECONDS)
    public void testHasNoGraphitLubricant() throws Throwable {
      // Given: a weapon data class and a SimpleWeapon object with a graphit lubricant
      JSWeaponData jSWeaponData = new JSWeaponData();
      SimpleWeapon arg0 = new SimpleWeapon(1, "`J!>Hm0RK8>O%N", 1, 1);
  
      // When: checking if the weapon has a graphit lubricant
      boolean graphitLubricant = jSWeaponData.hasGraphitLubricant(arg0);
  
      // Then: the weapon does not have a graphit lubricant
      assertFalse(graphitLubricant);
    }
  
    @Test
    @Timeout(value = 4000, unit = TimeUnit.MILLISECONDS)
    public void testGetGoldenGoldDeffBonus() throws Throwable {
      // Given a JSWeaponData object with a golden gold deff bonus value of 3
      JSWeaponData jSWeaponData = new JSWeaponData();
  
      // When the getGoldenGoldDeffBonus() method is called on the object
      int goldenGoldDeffBonus = jSWeaponData.getGoldenGoldDeffBonus();
  
      // Then the method should return the expected value of 3
      assertEquals(3, goldenGoldDeffBonus);
    }
  
    @Test
    @Timeout(value = 4000, unit = TimeUnit.MILLISECONDS)
    public void testHasShinyWeaponOilWithEmptyComment() throws Throwable {
      // No Comments were added
      JSWeaponData jSWeaponData = new JSWeaponData();
      SimpleWeapon arg0 = new SimpleWeapon(1, "\"J!>Hm0RK8>O%N", 1, 1);
      boolean shinyWeaponOil = jSWeaponData.hasShinyWeaponOil(arg0);
      assertFalse(shinyWeaponOil);
    }
  
    @Test
    @Timeout(value = 4000, unit = TimeUnit.MILLISECONDS)
    public void testHasFettesWeaponOil() throws Throwable {
      // Given: The Fettes's Weapon Data has a weapon with the id 106 and type
      // "de.outstare.fortbattleplayer.model.impl.JSWeaponData$WeaponGameData"
      // When: The method "hasFettesWeaponOil" is called with this weapon data
      // Then: It should return false, as Fettes's Weapon Data does not have any weapon oil in it
  
      JSWeaponData jSWeaponData = new JSWeaponData();
      SimpleWeapon arg0 =
          new SimpleWeapon(
              106, "de.outstare.fortbattleplayer.model.impl.JSWeaponData$WeaponGameData", 2, 106);
      boolean fettesWeaponOil = jSWeaponData.hasFettesWeaponOil(arg0);
      assertFalse(fettesWeaponOil);
    }
  
    @Test
    @Timeout(value = 4000, unit = TimeUnit.MILLISECONDS)
    public void testHasSchmierendesWeaponOilSimpleWeapon() throws Throwable {
      // Given: a JSWeaponData instance and a SimpleWeapon object with name "Apollo" and id 1
      JSWeaponData jSWeaponData = new JSWeaponData();
      SimpleWeapon simpleWeapon = new SimpleWeapon(1, "Apollo", 1, 1);
  
      // When: calling the hasSchmierendesWeaponOil method with the SimpleWeapon object as an argument
      boolean schmierendesWeaponOil = jSWeaponData.hasSchmierendesWeaponOil(simpleWeapon);
  
      // Then: the method should return false, since "Apollo" is not a weapon with schmierendes oil
      assertFalse(schmierendesWeaponOil);
    }
  
    @Test
    @Timeout(value = 4000, unit = TimeUnit.MILLISECONDS)
    public void testGetGoldenGoldDmgBonus() throws Throwable {
      // Given: A JSWeaponData object is created and a golden gold damage bonus is retrieved
      JSWeaponData jsWeaponData = new JSWeaponData();
      int goldenGoldDmgBonus = jsWeaponData.getGoldenGoldDmgBonus();
  
      // When: The golden gold damage bonus is compared to the expected value of 15
      assertEquals(15, goldenGoldDmgBonus);
    }
  
    @Test
    @Timeout(value = 4000, unit = TimeUnit.MILLISECONDS)
    public void testGetGoldenGoldAttBonusDefaultValue() throws Throwable {
      // Given: the JSWeaponData class is initialized with default values
      JSWeaponData jSWeaponData = new JSWeaponData();
  
      // When: the goldenGoldAttBonus value is retrieved from the weapon data
      int goldenGoldAttBonus = jSWeaponData.getGoldenGoldAttBonus();
  
      // Then: the goldenGoldAttBonus value should be 3
      assertEquals(3, goldenGoldAttBonus);
    }
  
    @Test
    @Timeout(value = 4000, unit = TimeUnit.MILLISECONDS)
    public void testHasLoadingChamberOrEnhancedPatronsReturnsFalse() throws Throwable {
      JSWeaponData jSWeaponData = new JSWeaponData();
      SimpleWeapon arg0 = new SimpleWeapon(15, "AK47", 15, 15);
      // Given: A simple weapon with a capacity of 15 and a name of "AK47"
  
      // When: Checking if the weapon has loading chamber or enhanced patrons
      boolean loadingchamberOrEnhancedPatrons = jSWeaponData.hasLoadingchamberOrEnhancedPatrons(arg0);
  
      // Then: The weapon does not have loading chamber or enhanced patrons, so the test should return false
      assertFalse(loadingchamberOrEnhancedPatrons);
    }
  
    @Test
    @Timeout(value = 4000, unit = TimeUnit.MILLISECONDS)
    public void testEqualsWithNullObject() throws Throwable {
      // Given: a JSWeaponData.WeaponGameData object with the specified values
      JSWeaponData.WeaponGameData weaponData =
          new JSWeaponData.WeaponGameData(
              0, 1, (-3531), 0, (-3531), "116,120,192,0,0,Rostige Flinte");
  
      // When: the object is compared to null
      boolean equals = weaponData.equals((Object) null);
  
      // Then: the result should be false
      assertFalse(equals);
  
      // And: the object's toString method should return the expected string
      assertEquals(
          "WeaponGameData: minDmg=1, maxDmg=-3531, offBonus=0, deffBonus=-3531, name=116,120,192,0,0,Rostige Flinte",
          weaponData.toString());
    }
  
    @Test
    @Timeout(value = 4000, unit = TimeUnit.MILLISECONDS)
    public void testMainMethodWithInvalidArguments() throws Throwable {
      // Given a set of input arguments for the JSWeaponData main method
      String[] inputArgs = new String[2];
  
      // When the method is called with the input arguments
      JSWeaponData.main(inputArgs);
  
      // Then the length of the argument array should be 2
      assertEquals(2, inputArgs.length);
    }
  }
  