I am not sure if I understand your question completely. So, I am going to assume to want to understand the reason for the NullPointerException. From looking at the code, it appears that the object "resolver" is null because it has not been initialized in the method setUp(). Maybe adding the line below in the method setUp() will help.
resolver = context.mock(ResourceResolver.class);