---
title: "Discussion on \"Understanding @InjectMocks for private field mocking\" | Hashnode"
description: "Discussion on \"Understanding @InjectMocks for private field mocking\". Recently I've been working on getting unit tests set up for a decent chunk of java code. The existing tests were more of a placeholder until the team I work with could set up more rigorous testing. The majority of the code hasn't updated very much bu..."
url: "https://hashnode.com/posts/understanding-injectmocks-for-private-field-mocking/61e1edccd546507ab034370a"
---

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

Discussion

# [Understanding @InjectMocks for private field mocking](https://practicingprogrammer.hashnode.dev/understanding-injectmocks-for-private-field-mocking?utm_source=hashnode&utm_medium=feed)

Recently I've been working on getting unit tests set up for a decent chunk of java code. The existing tests were more of a placeholder until the team I work with could set up more rigorous testing. The majority of the code hasn't updated very much bu...

Jan 14, 2022 · 8 min read · practicingprogrammer.hashnode.dev  
Read the article

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

## Written by

[Lance Alexander](https://hashnode.com/@KnitwitGeek)

@KnitwitGeek · Indiana, US

  
[View profile](https://hashnode.com/@KnitwitGeek)

while (!dead) { life++; }

I'm a developer from Indiana and I enjoy writing code both professionally and personally, although I admit I often find personal projects harder to start. My current focus has been on front end development with some dabbling in full stack development but I also desire to learn ways to better incorporate my skills to better my everyday life. I like sci-fi, fantasy, woodworking, and fixing up broken things. I like to relax and unwind by baking or fixing homemade pizza along with playing a variety of board/video games with my friends.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
