### Question:
Configuration implements CallbackAware, MetadataAware, UserAware { @Override public void addMetadata(@NonNull String section, @NonNull Map<String, ?> value) { if (section != null && value != null) { impl.addMetadata(section, value); } else { logNull("addMetadata"); } } Configuration(@NonNull String apiKey); @NonNull static Configuration load(@NonNull Context context); @NonNull String getApiKey(); void setApiKey(@NonNull String apiKey); @Nullable String getAppVersion(); void setAppVersion(@Nullable String appVersion); @Nullable Integer getVersionCode(); void setVersionCode(@Nullable Integer versionCode); @Nullable String getReleaseStage(); void setReleaseStage(@Nullable String releaseStage); @NonNull ThreadSendPolicy getSendThreads(); void setSendThreads(@NonNull ThreadSendPolicy sendThreads); boolean getPersistUser(); void setPersistUser(boolean persistUser); long getLaunchCrashThresholdMs(); void setLaunchCrashThresholdMs(long launchCrashThresholdMs); boolean getAutoTrackSessions(); void setAutoTrackSessions(boolean autoTrackSessions); @NonNull ErrorTypes getEnabledErrorTypes(); void setEnabledErrorTypes(@NonNull ErrorTypes enabledErrorTypes); boolean getAutoDetectErrors(); void setAutoDetectErrors(boolean autoDetectErrors); @Nullable String getAppType(); void setAppType(@Nullable String appType); @Nullable Logger getLogger(); void setLogger(@Nullable Logger logger); @NonNull Delivery getDelivery(); void setDelivery(@NonNull Delivery delivery); @NonNull EndpointConfiguration getEndpoints(); void setEndpoints(@NonNull EndpointConfiguration endpoints); int getMaxBreadcrumbs(); void setMaxBreadcrumbs(int maxBreadcrumbs); @Nullable String getContext(); void setContext(@Nullable String context); @NonNull Set<String> getRedactedKeys(); void setRedactedKeys(@NonNull Set<String> redactedKeys); @NonNull Set<String> getDiscardClasses(); void setDiscardClasses(@NonNull Set<String> discardClasses); @Nullable Set<String> getEnabledReleaseStages(); void setEnabledReleaseStages(@Nullable Set<String> enabledReleaseStages); @Nullable Set<BreadcrumbType> getEnabledBreadcrumbTypes(); void setEnabledBreadcrumbTypes(@Nullable Set<BreadcrumbType> enabledBreadcrumbTypes); @NonNull Set<String> getProjectPackages(); void setProjectPackages(@NonNull Set<String> projectPackages); @Override void addOnError(@NonNull OnErrorCallback onError); @Override void removeOnError(@NonNull OnErrorCallback onError); @Override void addOnBreadcrumb(@NonNull OnBreadcrumbCallback onBreadcrumb); @Override void removeOnBreadcrumb(@NonNull OnBreadcrumbCallback onBreadcrumb); @Override void addOnSession(@NonNull OnSessionCallback onSession); @Override void removeOnSession(@NonNull OnSessionCallback onSession); @Override void addMetadata(@NonNull String section, @NonNull Map<String, ?> value); @Override void addMetadata(@NonNull String section, @NonNull String key, @Nullable Object value); @Override void clearMetadata(@NonNull String section); @Override void clearMetadata(@NonNull String section, @NonNull String key); @Nullable @Override Map<String, Object> getMetadata(@NonNull String section); @Nullable @Override Object getMetadata(@NonNull String section, @NonNull String key); @NonNull @Override User getUser(); @Override void setUser(@Nullable String id, @Nullable String email, @Nullable String name); void addPlugin(@NonNull Plugin plugin);  }### Answer:
@Test public void testAddMetadata() { Configuration configuration = generateConfiguration(); configuration.addMetadata("keyVal", "foo", "bar"); HashMap<String, Object> testMap = new HashMap<>(); testMap.put("key1", "val1"); testMap.put("key2", "val2"); configuration.addMetadata("mapVal", testMap); assertEquals("bar", configuration.getMetadata("keyVal", "foo")); assertEquals("val1", configuration.getMetadata("mapVal", "key1")); assertEquals("val2", configuration.getMetadata("mapVal", "key2")); }