### Question:
DynamicSessionIDExtensions implements SessionIDExtensions { @Override public String getPrimaryID() { SessionIDCorrector corrector = query.getSessionIDCorrector(); if (corrector == null) { return delegate.getPrimaryID(); } return corrector.translatePrimaryID(delegate.getPrimaryID(), delegate.getSiteID()); } @VisibleForTesting  DynamicSessionIDExtensions(WebtopNamingQuery query, SessionIDExtensions delegate);  DynamicSessionIDExtensions(SessionIDExtensions delegate); @Override String getPrimaryID(); @Override String getSiteID(); @Override String getStorageKey(); @Override String get(String key); @Override void add(String key, String value); @Override Map<String, String> asMap(); @Override String toString();  }### Answer:
@Test public void shouldUseSessionIDCorrectorForPrimaryID() { dynamic.getPrimaryID(); verify(mockCorrector).translatePrimaryID(nullable(String.class), nullable(String.class)); }
@Test public void shouldUseSessionIDCorrectorForPrimaryID() { dynamic.getPrimaryID(); verify(mockCorrector).translatePrimaryID(anyString(), anyString()); }
@Test public void shouldReturnDelegateIfSessionIDCorrectorNotInitialised() { given(mockQuery.getSessionIDCorrector()).willReturn(null); dynamic.getPrimaryID(); verify(mockDelegate).getPrimaryID(); }