diff --git a/core-java-modules/core-java-date-operations/src/test/java/com/baeldung/datetime/DateUtilsUnitTest.java b/core-java-modules/core-java-date-operations/src/test/java/com/baeldung/datetime/DateUtilsUnitTest.java index 8711455265..9bc2a17f28 100644 --- a/core-java-modules/core-java-date-operations/src/test/java/com/baeldung/datetime/DateUtilsUnitTest.java +++ b/core-java-modules/core-java-date-operations/src/test/java/com/baeldung/datetime/DateUtilsUnitTest.java @@ -9,12 +9,6 @@ import static org.junit.Assert.assertEquals; public class DateUtilsUnitTest { - @Test - public void givenTimeMillis_thenDateIsReturned() { - Date now = DateUtils.getNow(); - assertEquals(DateUtils.getDate(now.getTime()), now); - } - @Test public void givenDateAndPattern_thenDateIsCorrectlyReturned() throws ParseException { long milliseconds = new Date(2020 - 1900, 0, 1).getTime(); diff --git a/core-java-modules/core-java-date-operations/src/test/java/com/baeldung/datetime/sql/DateUtilsUnitTest.java b/core-java-modules/core-java-date-operations/src/test/java/com/baeldung/datetime/sql/DateUtilsUnitTest.java index 945086c86f..9ccaa9a845 100644 --- a/core-java-modules/core-java-date-operations/src/test/java/com/baeldung/datetime/sql/DateUtilsUnitTest.java +++ b/core-java-modules/core-java-date-operations/src/test/java/com/baeldung/datetime/sql/DateUtilsUnitTest.java @@ -9,11 +9,6 @@ import org.junit.Test; public class DateUtilsUnitTest { - @Test - public void givenCurrentDate_thenTodayIsReturned() { - assertEquals(DateUtils.getNow().toLocalDate(), LocalDate.now()); - } - @Test(expected = IllegalArgumentException.class) public void givenDateAsString_whenPatternIsNotRespected_thenExceptionIsThrown() { DateUtils.getDate("2020 01 01"); diff --git a/core-java-modules/core-java-date-operations/src/test/java/com/baeldung/datetime/sql/TimestampUtilsUnitTest.java b/core-java-modules/core-java-date-operations/src/test/java/com/baeldung/datetime/sql/TimestampUtilsUnitTest.java index 2faf8fab0e..836d0d55e7 100644 --- a/core-java-modules/core-java-date-operations/src/test/java/com/baeldung/datetime/sql/TimestampUtilsUnitTest.java +++ b/core-java-modules/core-java-date-operations/src/test/java/com/baeldung/datetime/sql/TimestampUtilsUnitTest.java @@ -1,22 +1,13 @@ package com.baeldung.datetime.sql; -import static org.junit.Assert.assertEquals; - import org.junit.Test; -import com.baeldung.datetime.sql.TimestampUtils; - import java.text.ParseException; -import java.util.Date; + +import static org.junit.Assert.assertEquals; public class TimestampUtilsUnitTest { - @Test - public void givenCurrentTimestamp_thenNowIsReturned() { - assertEquals(TimestampUtils.getNow() - .getTime(), new Date().getTime()); - } - @Test(expected = IllegalArgumentException.class) public void givenTimestampAsString_whenPatternIsNotRespected_thenExceptionIsThrown() { TimestampUtils.getTimestamp("2020/01/01 10:11-12");