### Question:
ConfigFileBasedCredentialProviderConfig { @Config("connection-credential-file") @ConfigDescription("Location of the file where credentials are present") public ConfigFileBasedCredentialProviderConfig setCredentialFile(String connectionUser) { this.credentialsFile = connectionUser; return this; }  @Config("connection-credential-file") @ConfigDescription("Location of the file where credentials are present") ConfigFileBasedCredentialProviderConfig setCredentialFile(String connectionUser); @NotNull @FileExists String getCredentialFile();  }### Answer:
@Test public void testDefaults() { assertRecordedDefaults(recordDefaults(ConfigFileBasedCredentialProviderConfig.class) .setCredentialFile(null)); }
@Test public void testExplicitPropertyMappings() throws IOException { Path credentialFile = Files.createTempFile(null, null); Map<String, String> properties = new ImmutableMap.Builder<String, String>() .put("connection-credential-file", credentialFile.toString()) .build(); ConfigFileBasedCredentialProviderConfig expected = new ConfigFileBasedCredentialProviderConfig() .setCredentialFile(credentialFile.toString()); assertFullMapping(properties, expected); }