}
@Test
public void createMediaConfigurationWithProfileConfigurationSuccess() {
// Arrange
Configuration preConfiguration = new Configuration();
preConfiguration.setProperty("preexistingName", "preexistingValue");
// Act
Configuration configuration = MediaConfiguration
.configureWithOAuthAuthentication("testProfile",
preConfiguration, "https://testMediaServiceBaseUri",
"testOAuthUri", "testClientId", "testClientSecret",
"testScope");
// Assert
assertEquals("preexistingValue",
configuration.getProperty("preexistingName"));
assertEquals("https://testMediaServiceBaseUri",
configuration.getProperty("testProfile.media.uri"));
assertEquals("testOAuthUri",
configuration.getProperty("testProfile.media.oauth.uri"));
assertEquals("testClientId",
configuration.getProperty("testProfile.media.oauth.client.id"));
assertEquals("testClientSecret",
configuration
.getProperty("testProfile.media.oauth.client.secret"));
}