### Question:
UserPreferencesConfigurationSource extends AbstractConfigurationSource { @Override public <T> T getProperty(String key, T defaultValue) { return getConfigurationSource().getProperty(key, defaultValue); }  @Override T getProperty(String key, T defaultValue); @Override T getProperty(String key, Class<T> valueClass); @Override T getProperty(String key); @Override List<String> getKeys(); @Override boolean containsKey(String key); @Override boolean isEmpty(); @Override T getProperty(String key, Class<T> valueClass, T defaultValue); @Override void setProperties(Map<String, Object> properties);  }### Answer:
@Test void getPropertyWhenGuest() { DocumentReference userDocumentReference = new DocumentReference("wiki", "space", "XWikiGuest"); when(this.documentAccessBridge.getCurrentUserReference()).thenReturn(userDocumentReference); when(this.userReferenceResolver.resolve(userDocumentReference)).thenReturn(GuestUserReference.INSTANCE); this.source.getProperty("key"); verify(this.guestConfigurationSource).getProperty("key"); }
@Test void getPropertyWhenSuperAdmin() { DocumentReference userDocumentReference = new DocumentReference("wiki", "space", "superadmin"); when(this.documentAccessBridge.getCurrentUserReference()).thenReturn(userDocumentReference); when(this.userReferenceResolver.resolve(userDocumentReference)).thenReturn(SuperAdminUserReference.INSTANCE); this.source.getProperty("key"); verify(this.superAdminConfigurationSource).getProperty("key"); }
@Test void getPropertyWhenNormalUser() { DocumentReference userDocumentReference = new DocumentReference("wiki", "space", "user"); when(this.documentAccessBridge.getCurrentUserReference()).thenReturn(userDocumentReference); when(this.userReferenceResolver.resolve(userDocumentReference)).thenReturn(mock(UserReference.class)); this.source.getProperty("key"); verify(this.normalUserConfigurationSource).getProperty("key"); }