@Test
public void testSave() throws Exception {

    final String ruleContent = "rule \"empty\" when then";
    final String creationComment = "initial version";
    final Metadata metadata = mock(Metadata.class);
    when(metadataService.setUpAttributes(path, metadata)).thenReturn(Collections.EMPTY_MAP);
    when(commentedOptionFactory.makeCommentedOption(creationComment)).thenReturn(commentedOption);
    drlService.save(path, ruleContent, metadata, creationComment);
    verify(ioService).write(any(org.uberfire.java.nio.file.Path.class),
                            eq(ruleContent),
                            eq(Collections.EMPTY_MAP),
                            eq(commentedOption));
}