App { public static void main(String[] args) { IvoryTower ivoryTower1 = IvoryTower.getInstance(); IvoryTower ivoryTower2 = IvoryTower.getInstance(); System.out.println("ivoryTower1=" + ivoryTower1); System.out.println("ivoryTower2=" + ivoryTower2); ThreadSafeLazyLoadedIvoryTower threadSafeIvoryTower1 = ThreadSafeLazyLoadedIvoryTower .getInstance(); ThreadSafeLazyLoadedIvoryTower threadSafeIvoryTower2 = ThreadSafeLazyLoadedIvoryTower .getInstance(); System.out.println("threadSafeIvoryTower1=" + threadSafeIvoryTower1); System.out.println("threadSafeIvoryTower2=" + threadSafeIvoryTower2); EnumIvoryTower enumIvoryTower1 = EnumIvoryTower.INSTANCE; EnumIvoryTower enumIvoryTower2 = EnumIvoryTower.INSTANCE; System.out.println("enumIvoryTower1=" + enumIvoryTower1); System.out.println("enumIvoryTower2=" + enumIvoryTower2); InitializingOnDemandHolderIdiom demandHolderIdiom = InitializingOnDemandHolderIdiom.getInstance(); System.out.println(demandHolderIdiom); InitializingOnDemandHolderIdiom demandHolderIdiom2 = InitializingOnDemandHolderIdiom.getInstance(); System.out.println(demandHolderIdiom2); ThreadSafeDoubleCheckLocking dcl1 = ThreadSafeDoubleCheckLocking.getInstance(); System.out.println(dcl1); ThreadSafeDoubleCheckLocking dcl2 = ThreadSafeDoubleCheckLocking.getInstance(); System.out.println(dcl2); }  static void main(String[] args);  }
@Test public void test() { String[] args = {}; App.main(args); }