// Path: src/main/java/me/itzg/mccy/config/MccyAssetSettings.java
// @ConfigurationProperties("mccy.assets")
// @Component
// @ValidViaNetworkSettings
// @ValidViaFixedUriSettings
// public class MccyAssetSettings {
// 
//     @NotNull
//     private File storageDir;
// 
//     @NotNull
//     private Via via = Via.REQUEST_URL;
// 
//     private String network;
// 
//     private String myNameOnNetwork;
// 
//     private URI fixedUri;
// 
//     public Via getVia() {
//         return via;
//     }
// 
//     public void setVia(Via via) {
//         this.via = via;
//     }
// 
//     public File getStorageDir() {
//         return storageDir;
//     }
// 
//     public void setStorageDir(File storageDir) {
//         this.storageDir = storageDir;
//     }
// 
//     public String getNetwork() {
//         return network;
//     }
// 
//     public void setNetwork(String network) {
//         this.network = network;
//     }
// 
//     public URI getFixedUri() {
//         return fixedUri;
//     }
// 
//     @SuppressWarnings("unused")
//     public void setFixedUri(URI fixedUri) {
//         this.fixedUri = fixedUri;
//     }
// 
//     public String getMyNameOnNetwork() {
//         return myNameOnNetwork;
//     }
// 
//     public void setMyNameOnNetwork(String myNameOnNetwork) {
//         this.myNameOnNetwork = myNameOnNetwork;
//     }
// 
//     public enum Via {
//         NETWORK,
//         LINK,
//         FIXED_URI,
//         REQUEST_URL
//     }
// }


import me.itzg.mccy.config.MccyAssetSettings;
import org.hamcrest.Matchers;
import org.hibernate.validator.HibernateValidator;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import org.springframework.validation.beanvalidation.LocalValidatorFactoryBean;
import javax.validation.ConstraintViolation;
import javax.validation.Validator;
import java.net.URI;
import java.util.Set;
import static org.junit.Assert.assertThat;
package me.itzg.mccy.services;




/**
 * @author Geoff Bourne
 * @since 0.2
 */
@SuppressWarnings("Duplicates")
public class MccyAssetSettingsFixedUriValidatorTest {

    private LocalValidatorFactoryBean validatorFactoryBean;

    @Rule
    public TemporaryFolder temporaryFolder = new TemporaryFolder();

    @Before
    public void setUp() throws Exception {
        validatorFactoryBean = new LocalValidatorFactoryBean();
        validatorFactoryBean.setProviderClass(HibernateValidator.class);
        validatorFactoryBean.afterPropertiesSet();

    }

    @Test
    public void testViolatesNone() throws Exception {
        final Validator validator = validatorFactoryBean.getValidator();

// Path: src/main/java/me/itzg/mccy/config/MccyAssetSettings.java
// @ConfigurationProperties("mccy.assets")
// @Component
// @ValidViaNetworkSettings
// @ValidViaFixedUriSettings
// public class MccyAssetSettings {
// 
//     @NotNull
//     private File storageDir;
// 
//     @NotNull
//     private Via via = Via.REQUEST_URL;
// 
//     private String network;
// 
//     private String myNameOnNetwork;
// 
//     private URI fixedUri;
// 
//     public Via getVia() {
//         return via;
//     }
// 
//     public void setVia(Via via) {
//         this.via = via;
//     }
// 
//     public File getStorageDir() {
//         return storageDir;
//     }
// 
//     public void setStorageDir(File storageDir) {
//         this.storageDir = storageDir;
//     }
// 
//     public String getNetwork() {
//         return network;
//     }
// 
//     public void setNetwork(String network) {
//         this.network = network;
//     }
// 
//     public URI getFixedUri() {
//         return fixedUri;
//     }
// 
//     @SuppressWarnings("unused")
//     public void setFixedUri(URI fixedUri) {
//         this.fixedUri = fixedUri;
//     }
// 
//     public String getMyNameOnNetwork() {
//         return myNameOnNetwork;
//     }
// 
//     public void setMyNameOnNetwork(String myNameOnNetwork) {
//         this.myNameOnNetwork = myNameOnNetwork;
//     }
// 
//     public enum Via {
//         NETWORK,
//         LINK,
//         FIXED_URI,
//         REQUEST_URL
//     }
// }


// Path: src/test/java/me/itzg/mccy/services/MccyAssetSettingsFixedUriValidatorTest.java
import me.itzg.mccy.config.MccyAssetSettings;
import org.hamcrest.Matchers;
import org.hibernate.validator.HibernateValidator;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import org.springframework.validation.beanvalidation.LocalValidatorFactoryBean;
import javax.validation.ConstraintViolation;
import javax.validation.Validator;
import java.net.URI;
import java.util.Set;
import static org.junit.Assert.assertThat;

package me.itzg.mccy.services;




/**
 * @author Geoff Bourne
 * @since 0.2
 */
@SuppressWarnings("Duplicates")
public class MccyAssetSettingsFixedUriValidatorTest {

    private LocalValidatorFactoryBean validatorFactoryBean;

    @Rule
    public TemporaryFolder temporaryFolder = new TemporaryFolder();

    @Before
    public void setUp() throws Exception {
        validatorFactoryBean = new LocalValidatorFactoryBean();
        validatorFactoryBean.setProviderClass(HibernateValidator.class);
        validatorFactoryBean.afterPropertiesSet();

    }

    @Test
    public void testViolatesNone() throws Exception {
        final Validator validator = validatorFactoryBean.getValidator();

        final MccyAssetSettings settings = new MccyAssetSettings();