@Test
public void testSave() throws Exception {

    final String fileName = "enum.enumeration";
    final String fileContent = "'Person.age' : [10,20,30]\n";
    final String comment = "comment of the author";
    final Metadata metadata = mock(Metadata.class);
    final Path path = PathFactory.newPath(fileName, getClass().getResource("enums").toString());
    when(commentedOptionFactory.makeCommentedOption(comment)).thenReturn(commentedOption);
    when(metadataService.setUpAttributes(path, metadata)).thenReturn(Collections.EMPTY_MAP);
    enumService.save(path,
                     fileContent,
                     metadata,
                     comment);
    verify(ioService).write(any(org.uberfire.java.nio.file.Path.class),
                            eq(fileContent),
                            eq(Collections.EMPTY_MAP),
                            eq(commentedOption));
}