Mock methods that manipulate parameters

Recently, I’ve worked a little bit on redis cache for Imcache. I needed to mock a behavior of a method where the method manipulates given parameters e.g. change state or call another method. After a little bit of research, I’ve found out there’s a nice mockito feature that accomplishes what I want: doAnswer. Basically, doAnswer allows stubbing a void method […]

A guide for Code Reviews

Code reviews shouldn’t be about ego. Still, every time you send one, you’re putting yourself out there. You want your work reviewed but at the same time it makes you vulnerable. The point isn’t to tear each other down, it’s about shipping solid code and not screwing the team over. Bad CRs waste time: vague descriptions, missing tests, or five […]