### Question:
AbstractGroupsManager implements ProctorContextDescriptor { @VisibleForTesting protected ProctorResult determineBucketsInternal(final TestType testType, final String identifier, final Map<String, Object> context) { final Map<String, Integer> forcedGroups = emptyMap(); final Identifiers identifiers = new Identifiers(testType, identifier); return determineBucketsInternal(identifiers, context, forcedGroups); } protected  AbstractGroupsManager(final Supplier<Proctor> proctorSource);   }### Answer:
@Test public void testDetermineBuckets() { final Proctor proctorMock = mock(Proctor.class); final Identifiers identifiers = Identifiers.of(TestType.ANONYMOUS_USER, "fooUser"); final AbstractGroupsManager manager = new AbstractGroupsManager(() -> proctorMock) { @Override public Map<String, String> getProvidedContext() { return null; } @Override protected Map<String, TestBucket> getDefaultBucketValues() { return null; } }; final HttpServletRequest httpRequestMock = mock(HttpServletRequest.class); final HttpServletResponse httpResponseMock = mock(HttpServletResponse.class); { manager.determineBucketsInternal( httpRequestMock, httpResponseMock, identifiers, emptyMap(), true); verify(httpRequestMock, times(1)).getContextPath(); verify(httpRequestMock, times(1)).getHeader(anyString()); verify(httpRequestMock, times(1)).getCookies(); verify(httpRequestMock, times(1)).getParameter(anyString()); verifyNoMoreInteractions(httpRequestMock, httpResponseMock); clearInvocations(httpRequestMock, httpResponseMock); } { when(httpRequestMock.getParameter(FORCE_GROUPS_PARAMETER)).thenReturn("foo1"); manager.determineBucketsInternal( httpRequestMock, httpResponseMock, identifiers, emptyMap(), false); verifyNoMoreInteractions(httpRequestMock, httpResponseMock); clearInvocations(httpRequestMock, httpResponseMock); } { manager.determineBucketsInternal( httpRequestMock, httpResponseMock, identifiers, emptyMap(), true); verify(httpRequestMock, times(1)).getContextPath(); verify(httpRequestMock, times(1)).getParameter(anyString()); verify(httpResponseMock, times(1)).addCookie(isA(Cookie.class)); verifyNoMoreInteractions(httpRequestMock, httpResponseMock); clearInvocations(httpRequestMock, httpResponseMock); } }