@Test
public void generateFromModel_filesList_notEmptyInterfaces() {

    ActorParsedModel model = new ActorParsedModel();
    ActorGeneratedModel generated = new ActorGeneratedModel();
    model.collectInterfaces = true;
    ActorInterfaceDescription _interface = Mockito.mock(ActorInterfaceDescription.class);
    model.interfaces.add(_interface);
    ActorInterfaceGenerator generator = Mockito.mock(ActorInterfaceGenerator.class);
    JavaFile file = JavaFile.builder("com.truecaller.androidactors", TypeSpec.classBuilder("SimpleActor").build()).build();
    Mockito.doReturn(generator).when(mFactory).createInterfaceGenerator(_interface);
    Mockito.doReturn(file).when(generator).generate(Mockito.<NamesProvider>any());
    ActorsProcessor processor = new ActorsProcessor(mFactory);
    processor.generateFromModel(model, generated);
    Mockito.verify(mFactory).createInterfaceGenerator(_interface);
    Mockito.verify(generator).generate(Mockito.<NamesProvider>any());
    Assert.assertSame(file, generated.files.get(0));
    Mockito.verifyNoMoreInteractions(mFactory);
}