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

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