### Question:
ConfigManager { public ConfigDescriptor getConfigDescriptor(Object configurationProxy) { Class<?> inter = configurationProxy.getClass().getInterfaces()[0]; ConfigGroup group = inter.getAnnotation(ConfigGroup.class); if (group == null) { throw new IllegalArgumentException("Not a config group"); } final List<ConfigItemDescriptor> items = Arrays.stream(inter.getMethods()) .filter(m -> m.getParameterCount() == 0) .map(m -> new ConfigItemDescriptor( m.getDeclaredAnnotation(ConfigItem.class), m.getReturnType(), m.getDeclaredAnnotation(Range.class), m.getDeclaredAnnotation(Alpha.class) )) .sorted((a, b) -> ComparisonChain.start() .compare(a.getItem().position(), b.getItem().position()) .compare(a.getItem().name(), b.getItem().name()) .result()) .collect(Collectors.toList()); return new ConfigDescriptor(group, items); } @Inject  ConfigManager(ScheduledExecutorService scheduledExecutorService); final void switchSession(AccountSession session); void load(); T getConfig(Class<T> clazz); List<String> getConfigurationKeys(String prefix); String getConfiguration(String groupName, String key); T getConfiguration(String groupName, String key, Class<T> clazz); void setConfiguration(String groupName, String key, String value); void setConfiguration(String groupName, String key, Object value); void unsetConfiguration(String groupName, String key); ConfigDescriptor getConfigDescriptor(Object configurationProxy); void setDefaultConfiguration(Object proxy, boolean override); void sendConfig();  }### Answer:
@Test public void testGetConfigDescriptor() throws IOException { AccountSession accountSession = new AccountSession(UUID.randomUUID(), Instant.now()); accountSession.setUsername("test"); TestConfig conf = manager.getConfig(TestConfig.class); ConfigDescriptor descriptor = manager.getConfigDescriptor(conf); Assert.assertEquals(1, descriptor.getItems().size()); }