### Question:
BatchPolicyRequest extends PolicyRequest { public static BatchPolicyRequest getBatchPolicyRequest(final Context context, final ActionRequest request, SSOTokenManager tokenManager) throws EntitlementException { return new BatchPolicyRequestBuilder(context, request, tokenManager).build(); } private  BatchPolicyRequest(final BatchPolicyRequestBuilder builder); Set<String> getResources(); @Override List<Entitlement> dispatch(final PolicyEvaluator evaluator); static BatchPolicyRequest getBatchPolicyRequest(final Context context, final ActionRequest request,
            SSOTokenManager tokenManager);  }### Answer:
@Test(expectedExceptions = EntitlementException.class) public void shouldRejectNullResources() throws EntitlementException { Map<String, Object> properties = new HashMap<String, Object>(); given(actionRequest.getContent()).willReturn(JsonValue.json(properties)); given(subjectContext.getCallerSubject()).willReturn(restSubject); Context context = buildContextStructure("/abc"); BatchPolicyRequest.getBatchPolicyRequest(context, actionRequest, tokenManager); }
@Test(expectedExceptions = EntitlementException.class) public void shouldRejectEmptyResources() throws EntitlementException { Map<String, Object> properties = new HashMap<String, Object>(); given(actionRequest.getContent()).willReturn(JsonValue.json(properties)); given(subjectContext.getCallerSubject()).willReturn(restSubject); Context context = buildContextStructure("/abc"); BatchPolicyRequest.getBatchPolicyRequest(context, actionRequest, tokenManager); }