@Test
public void testSerializeWithFilledLocationAndEmptyProperties(){

    String expected = "{\"location\":\"test/uri\"}";
    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);
    when(spyDescriptor.loadProperties()).thenReturn(PropertiesFactory.eINSTANCE.createPropertyFile());
    StringBuilder result = new StringBuilder();
    getFixture().serialize(spyDescriptor, result, 2);
    assertEquals(expected, result.toString());
}