@Test public void testGetEditButtonPmo() { assertThat(Sections.getEditButtonPmo(new SectionPmoWithoutId()), is(absent())); assertThat(Sections.getEditButtonPmo(new DefaultPresentationModelObject()), is(absent())); TestSectionPmo testSectionPmo = new TestSectionPmo(); assertThat(Sections.getEditButtonPmo(testSectionPmo), is(absent())); TestButtonPmo editButtonPmo = new TestButtonPmo(); testSectionPmo.setEditButtonPmo(editButtonPmo); assertThat(Sections.getEditButtonPmo(testSectionPmo), hasValue(editButtonPmo)); }
public static Optional<ButtonPmo> getEditButtonPmo(Object pmo) { return (pmo instanceof PresentationModelObject) ? ((PresentationModelObject)pmo).getEditButtonPmo() : Optional.empty(); }
Sections { public static Optional<ButtonPmo> getEditButtonPmo(Object pmo) { return (pmo instanceof PresentationModelObject) ? ((PresentationModelObject)pmo).getEditButtonPmo() : Optional.empty(); } }
Sections { public static Optional<ButtonPmo> getEditButtonPmo(Object pmo) { return (pmo instanceof PresentationModelObject) ? ((PresentationModelObject)pmo).getEditButtonPmo() : Optional.empty(); } private  Sections(); }
Sections { public static Optional<ButtonPmo> getEditButtonPmo(Object pmo) { return (pmo instanceof PresentationModelObject) ? ((PresentationModelObject)pmo).getEditButtonPmo() : Optional.empty(); } private  Sections(); static String getSectionId(Object pmo); static Optional<ButtonPmo> getEditButtonPmo(Object pmo); }
Sections { public static Optional<ButtonPmo> getEditButtonPmo(Object pmo) { return (pmo instanceof PresentationModelObject) ? ((PresentationModelObject)pmo).getEditButtonPmo() : Optional.empty(); } private  Sections(); static String getSectionId(Object pmo); static Optional<ButtonPmo> getEditButtonPmo(Object pmo);  }