### Question:
DriftDefinition implements Serializable { public BaseDirectory getBasedir() { PropertyMap map = configuration.getMap(DriftConfigurationDefinition.PROP_BASEDIR); if (map == null) { return null; } String valueContext = map.getSimpleValue(DriftConfigurationDefinition.PROP_BASEDIR_VALUECONTEXT, null); String valueName = map.getSimpleValue(DriftConfigurationDefinition.PROP_BASEDIR_VALUENAME, null); BaseDirValueContext valueContextEnum; if (valueContext == null) { throw new NullPointerException("valueContext is null"); } else { try { valueContextEnum = BaseDirValueContext.valueOf(valueContext); } catch (Exception e) { throw new IllegalArgumentException("Invalid valueContext: " + valueContext); } } if (valueName == null) { throw new NullPointerException("valueName is null"); } return new BaseDirectory(valueContextEnum, valueName); } protected  DriftDefinition();  DriftDefinition(Configuration c); int getId(); void setId(int id); Long getCtime(); String getName(); void setName(String name); String getDescription(); void setDescription(String description); boolean isEnabled(); void setEnabled(Boolean isEnabled); boolean isAttached(); void setAttached(Boolean attached); DriftHandlingMode getDriftHandlingMode(); void setDriftHandlingMode(DriftHandlingMode driftHandlingMode); long getInterval(); void setInterval(Long interval); boolean isPinned(); void setPinned(boolean isPinned); Configuration getConfiguration(); void setConfiguration(Configuration configuration); Resource getResource(); void setResource(Resource resource); DriftDefinitionTemplate getTemplate(); void setTemplate(DriftDefinitionTemplate template); DriftComplianceStatus getComplianceStatus(); void setComplianceStatus(DriftComplianceStatus complianceStatus); @Override String toString(); BaseDirectory getBasedir(); void setBasedir(BaseDirectory basedir); List<Filter> getIncludes(); List<Filter> getExcludes(); void setIncludes(List<Filter> includesFilters); void addInclude(Filter filter); void setExcludes(List<Filter> excludesFilters); void addExclude(Filter filter);  }### Answer:
@Test public void getBasedirForFileSystemContext() { String basedir = "/opt/drift/test"; Configuration config = new Configuration(); PropertyMap map = new PropertyMap(PROP_BASEDIR); map.put(new PropertySimple(PROP_BASEDIR_VALUECONTEXT, fileSystem)); map.put(new PropertySimple(PROP_BASEDIR_VALUENAME, basedir)); config.put(map); DriftDefinition driftDef = new DriftDefinition(config); assertEquals(driftDef.getBasedir().getValueName(), basedir, "Failed to get drift definition base directory"); }