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

    File mockEnFile = Mockito.mock(File.class);
    File mockFrFile = Mockito.mock(File.class);
    Generator generator = new Generator(mockWriter, mockRenderer, mockApplication, mockDir, null) {
        @Override
        protected File getDestFile(String name) {
            if (name.equals("en-US.json")) return mockEnFile;
            if (name.equals("fr-FR.json")) return mockFrFile;
            fail("expected en-US.json or fr-FR.json");
            return null;
        }
    };
    InteractionModelEnvelope mockEnModel = InteractionModelEnvelope.builder()
        .withInteractionModel(InteractionModel.builder().build())
        .build();
    InteractionModelEnvelope mockFrModel = InteractionModelEnvelope.builder().build();
    Mockito.when(mockRenderer.render(mockSkill, en_US)).thenReturn(mockEnModel);
    Mockito.when(mockRenderer.render(mockSkill, fr_FR)).thenReturn(mockFrModel);
    Mockito.when(mockDir.exists())
        .thenReturn(true)
        .thenReturn(false);
    generator.generate();
    Mockito.verify(mockWriter).writeValue(mockEnFile, mockEnModel);
    Mockito.verify(mockWriter).writeValue(mockFrFile, mockFrModel);
}