Hi Esteban, Thanks for the pointer. Context.build helped me fix the issue. Also, how to mock this resource?Resource res = request.getResource(); The below statement helps to pick my mock resource, only when I invoke my model init() method directly.lenient().when(request.getResource()).thenReturn(...