Mockito can mock static methods!
07.11.2020

Hot news!

Mockito just released version 3.4.0 which can now mock static methods.

Migration to Mockito 2.1
10.11.2016

Recently we got a great news.

They released Mockito 2.1.0 - after so many years of hopeless waiting!

There is a lot of cool updates in Mockito 2, including:

  • Support for Java 8
  • Migration from CGLIB to ByteBuddy
  • Mocking final classes and methods

Yes! I must use it! - I decided.

What a huge disappointment it was for me…

Spring boobs
10.03.2016

Six years ago I developed an enterprise project with Spring framework.

We believed that Spring is a bloody enterprise.

We wanted to get rid of this boilerplate.

We were young and courage, we wanted changes.

About Legacy code
08.26.2016

My interview for jug.ru About Legacy code without maximalism.

Including: TDD, sport, Sherlock Holmes and real men.

How Java8 can help in writing unit-tests
04.11.2016

Problem

Typically you need to create a lot of various objects with various states in your tests. But you don’t always have appropriate constructors, and probably don’t want to have too many constructors.

And Java 8 can help here!

Effective UI tests with Selenide
12.31.2015

Waiting for miracles

Christmas is a time for miracles. On the eve of the new year we all build plans for the next. And we hope that all problems will leave in the ending year, and a miracle happens in the coming year.

Every Java developer dreams about a miracle that lets him become The Most Effective Java Developer in the world.

I want to show you such a miracle.

It’s called automated tests!

Why IDEA is better than Eclipse
12.12.2012

Holy war

There are “eternal” questions that have no single correct answer. E.g. what is better: Windows or Linux, Java or C#; who is stronger, Chuck Norris or Van Damme. One of such holywars is selection of the best Java IDE.

WTF is business logic?
03.03.2011

Question

I have heard many times the term “logic” or “business-logic” in discussions about software development. For instance:

  • (about unit-tests) it’s not necessary to achieve 100% code coverage, testing of logic is god enough.
  • (about web applications architecture) controller should not contain any business logic, it only should call other classes’s methods.
  • VIEW layer (e.g. JSP files) should not contain any business logic

Now tell me, what is “logic”?

Inspiration for tests
02.10.2011

not translated yet

Unit-test evolution
10.29.2010

TDD is not absolute goodness. Tests can be different.

Let’s consider how bad can be unit-test and how can it evolve.

Why the devil invented javadoc?
05.02.2010

It is believed that a good program should be well documented.

SUN company even creared a special format javadoc - “a standard for documenting classes Java”. In fact, it was quite a common case in my experience, when a code did not pass Code Review just because some of its methods lacked comments.

Today I’ll tell you why the comments are evil.