@Test
public void serializeAsFieldDoesNotWritePropertiesIfNoPropertiesProvided() throws Exception {

    // given
    VirtualPropertiesWriter writer = new VirtualPropertiesWriter(
            new VirtualProperty[0],
            mock(ValueResolver.class)
    );
    JsonGenerator jsonGenerator = mock(JsonGenerator.class);
    // when
    writer.serializeAsField(new Object(), jsonGenerator, mock(SerializerProvider.class));
    // then
    verify(jsonGenerator, never()).writeFieldName(anyString());
    verify(jsonGenerator, never()).writeString(anyString());
    verify(jsonGenerator, never()).writeString(eq((String)null));
}