@Test
public void testSerializePropertyFileDescriptorWithDepth1AndURI() {

    PropertyFileDescriptor spyDescriptor = mock(PropertyFileDescriptor.class);
    when(spyDescriptor.eGet(PropertiesPackage.Literals.PROPERTY_FILE_DESCRIPTOR__LOCATION)).thenReturn(URI.createURI("test/uri"));
    when(spyDescriptor.eIsSet(PropertiesPackage.Literals.PROPERTY_FILE_DESCRIPTOR__LOCATION)).thenReturn(true);
    when(spyDescriptor.eClass()).thenReturn(PropertiesPackage.Literals.PROPERTY_FILE_DESCRIPTOR);
    PropertyFile file = PropertiesFactory.eINSTANCE.createPropertyFile();
    when(spyDescriptor.loadProperties()).thenReturn(file);
    Property property = PropertiesFactory.eINSTANCE.createProperty();
    property.setComment("comment1");
    property.setKey("key1");
    property.setValue("value1");
    file.getProperties().add(property);
    Property property2 = PropertiesFactory.eINSTANCE.createProperty();
    property2.setComment("comment2");
    property2.setKey("key2");
    property2.setValue("value2");
    file.getProperties().add(property2);
    StringBuilder result = new StringBuilder();
    getFixture().serialize(spyDescriptor, result, 1);
    String expected = "{\"location\":\"test/uri\"}";
    assertEquals(expected, result.toString());
}