---
title: "Discussion on \"Unit testing time driven methods\" | Hashnode"
description: "Discussion on \"Unit testing time driven methods\". Hi! This is my first post on a series of quick tips to improve your tests in Java, I hope you will learn something today 👍\nHave you ever used Instant.now(), LocalDateTime.now() or ZonedDateTime.now() in your code, only to find it difficult to test l..."
url: "https://hashnode.com/posts/unit-testing-time-driven-methods/617456a00c5e175a1c616a3d"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Unit testing time driven methods](https://daviddasilva.net/unit-testing-time-driven-methods?utm_source=hashnode&utm_medium=feed)

Hi! This is my first post on a series of quick tips to improve your tests in Java, I hope you will learn something today 👍 Have you ever used Instant.now(), LocalDateTime.now() or ZonedDateTime.now() in your code, only to find it difficult to test l...

Oct 23, 2021 · 3 min read · daviddasilva.net  
Read the article

-   [#java](https://hashnode.com/tag/java)
-   [#time](https://hashnode.com/tag/time)
-   [#unit-testing](https://hashnode.com/tag/unit-testing)
-   [#testing](https://hashnode.com/tag/testing)

## Written by

[David Da Silva](https://hashnode.com/@david-dasilva)

@david-dasilva · Bordeaux, France

  
[View profile](https://hashnode.com/@david-dasilva)

I write bugs during the day and fix them by night

I'm a developer from France, I mainly do backend dev and DevOps on micro-service environments. I also give formations about Spring Framework and other subjects. Currently working at Zenika Bordeaux and not changing anytime soon :D

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
