@Test
public void testWriteToDir() throws GeneratorException, IOException {

    Mockito.when(mockDir.exists()).thenReturn(true);
    underTest.generate();
    Mockito.verify(mockDir, Mockito.never()).mkdirs();
    Mockito.verify(mockWriter).writeValue(mockFile, mockModel);
}