content: /*
   * This file was automatically generated by EvoSuite
   * Tue Feb 13 11:55:23 GMT 2024
   */
  
  package com.lts.caloriecount.data.budget;
  
  import org.evosuite.runtime.EvoRunner;
  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 static org.evosuite.runtime.EvoAssertions.*;
  import com.lts.caloriecount.data.budget.Budget;
  import com.lts.caloriecount.data.budget.TimeOfDay;
  import com.lts.caloriecount.data.meal.MealList;
  import com.lts.xml.simple.SimpleElement;
  import org.evosuite.runtime.EvoRunnerJUnit5;
  import org.evosuite.runtime.EvoRunnerParameters;
  import org.evosuite.runtime.System;
  import org.junit.jupiter.api.extension.RegisterExtension;
  import org.junit.runner.RunWith;
  
  @RunWith(EvoRunner.class)
  @EvoRunnerParameters(
          mockJVMNonDeterminism = true,
          useVFS = true,
          useVNET = true,
          resetStaticState = true,
          separateClassLoader = true)
  public class Budget_ESTest extends Budget_ESTest_scaffolding {
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetDailyAmountReturningPositive()  throws Throwable  {
        Budget budget0 = new Budget();
        budget0.setCaloriesPerHour((-1269.50287));
        TimeOfDay timeOfDay0 = new TimeOfDay((-4302L));
        budget0.setStartOfDay(timeOfDay0);
        int int0 = budget0.getDailyAmount();
        assertEquals(30446, int0);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetDailyAmountReturningNegative()  throws Throwable  {
        Budget budget0 = new Budget();
        TimeOfDay timeOfDay0 = new TimeOfDay((-1L));
        budget0.setStartOfDay(timeOfDay0);
        budget0.setCaloriesPerHour(1348.99416223424);
        int int0 = budget0.getDailyAmount();
        assertEquals((-32353), int0);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreateSerializationElement0()  throws Throwable  {
        Budget budget0 = new Budget();
        SimpleElement simpleElement0 = budget0.createSerializationElement();
        budget0.populateFromElement(simpleElement0);
        assertEquals(0.0, budget0.getCaloriesPerHour(), 0.01);
        assertFalse(budget0.isDirty());
        assertEquals("budget", simpleElement0.getName());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreatesBudget()  throws Throwable  {
        Budget budget0 = new Budget();
        SimpleElement simpleElement0 = new SimpleElement("budget", "budget");
        budget0.populateFromElement(simpleElement0);
        assertFalse(budget0.getDirty());
        assertEquals(0.0, budget0.getCaloriesPerHour(), 0.01);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testPostDeserialize()  throws Throwable  {
        Budget budget0 = new Budget();
        budget0.postDeserialize();
        assertEquals(0L, budget0.getInterval());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetDailyAmountReturningZero()  throws Throwable  {
        Budget budget0 = new Budget();
        int int0 = budget0.getDailyAmount();
        assertEquals(0, int0);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCopyFromThrowsClassCastException()  throws Throwable  {
        Budget budget0 = new Budget();
        MealList mealList0 = new MealList();
        // Undeclared exception!
        try { 
          budget0.copyFrom(mealList0);
          fail("Expecting exception: ClassCastException");
        
        } catch(ClassCastException e) {
           //
           // class com.lts.caloriecount.data.meal.MealList cannot be cast to class com.lts.caloriecount.data.budget.Budget (com.lts.caloriecount.data.meal.MealList and com.lts.caloriecount.data.budget.Budget are in unnamed module of loader org.evosuite.instrumentation.InstrumentingClassLoader @c65a3d5)
           //
           verifyException("com.lts.caloriecount.data.budget.Budget", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testReplaceWith()  throws Throwable  {
        Budget budget0 = new Budget();
        budget0.replaceWith(budget0);
        assertEquals(0.0, budget0.getCaloriesPerHour(), 0.01);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testSerializeTo()  throws Throwable  {
        Budget budget0 = new Budget();
        SimpleElement simpleElement0 = budget0.createSerializationElement();
        budget0.serializeTo(simpleElement0);
        assertEquals("budget", simpleElement0.getName());
        assertEquals(0.0, budget0.getCaloriesPerHour(), 0.01);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreateSerializationElement1()  throws Throwable  {
        Budget budget0 = new Budget();
        SimpleElement simpleElement0 = budget0.createSerializationElement();
        simpleElement0.createChild("period", (-1));
        budget0.populateFromElement(simpleElement0);
        assertEquals("budget", simpleElement0.getName());
        assertFalse(budget0.getDirty());
        assertEquals(0L, budget0.getInterval());
        assertEquals(0.0, budget0.getCaloriesPerHour(), 0.01);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testDeserializeFrom()  throws Throwable  {
        Budget budget0 = new Budget();
        SimpleElement simpleElement0 = new SimpleElement("hour", (-1073741824));
        budget0.deserializeFrom(simpleElement0);
        assertEquals(0.0, budget0.getCaloriesPerHour(), 0.01);
        assertFalse(budget0.getDirty());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testSetCaloriesPerHour()  throws Throwable  {
        Budget budget0 = new Budget();
        budget0.setCaloriesPerHour(10.0);
        System.setCurrentTimeMillis(0L);
        int int0 = budget0.getBudgetUpToNow();
        assertEquals(10.0, budget0.getCaloriesPerHour(), 0.01);
        assertEquals(0, int0);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetBudgetUpToNowReturningPositive()  throws Throwable  {
        Budget budget0 = new Budget();
        budget0.setCaloriesPerHour(10.0);
        int int0 = budget0.getBudgetUpToNow();
        assertEquals(10.0, budget0.getCaloriesPerHour(), 0.01);
        assertTrue(int0 > 0);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testInitialize()  throws Throwable  {
        Budget budget0 = new Budget();
        budget0.initialize();
        assertEquals(0L, budget0.getInterval());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetSerializationName()  throws Throwable  {
        Budget budget0 = new Budget();
        String string0 = budget0.getSerializationName();
        assertEquals("budget", string0);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetBudgetUpToNow()  throws Throwable  {
        Budget budget0 = new Budget();
        int int0 = budget0.getBudgetUpToNow();
        assertEquals(0, int0);
    }
  }
  