Fix a NullPointerException due to an incomplete mock