This is on purpose.
Once you call the build() method, you'll get that exception. We intentionally allow you to set the field to 'null' in the builder, for a number of reasons:
* The builder's field cannot be called @NonNull, as it starts out as null. There is no practical way we can let you specify the initial value.
* It's a builder. The entire point of one is to be the context for the time between the thought of 'I want to make a complex object that has various prerequisites' and 'It is complete; I sign off on the requisites'. As you call methods on the builder, you're in the limbo state where the object is not valid. Throwing exceptions during this time is a bad idea as it's a known and workable state. For example, while this is reaching a little bit, you can call a set method on the builder to set the field back to null, as a way to say: Okay, right now I want any calls to build() to just fail, until someone remembers to actually set this to a valid value later.
Basically, update your test to expect the NPE when calling build().