PerspectiveEditorGenerator { public void generatePerspective(String layoutEditorModel) { perspectiveServices.call((LayoutTemplate perspective) -> { if (perspective != null) { generatePerspective(perspective); } }).convertToLayoutTemplate(layoutEditorModel); } @Inject  PerspectiveEditorGenerator(SyncBeanManager beanManager,
                                      ActivityBeansCache activityBeansCache,
                                      LayoutGenerator layoutGenerator,
                                      Caller<PerspectiveServices> perspectiveServices); @PostConstruct void loadPerspectives(); void generatePerspective(String layoutEditorModel); PerspectiveEditorActivity generatePerspective(LayoutTemplate layoutTemplate); void removePerspective(String perspectiveName);  }
@Test public void testGeneratedActivitiesIdentifier() { LayoutTemplate layoutTemplate = new LayoutTemplate("test"); PerspectiveEditorActivity perspectiveActivity = generator.generatePerspective(layoutTemplate); PerspectiveEditorScreenActivity screenActivity = perspectiveActivity.getScreen(); assertNotNull(perspectiveActivity); assertNotNull(screenActivity); assertEquals(perspectiveActivity.getIdentifier(), "test"); assertEquals(screenActivity.getIdentifier(), "test [Screen]"); }