@@ -0,0 +1,930 @@
+package com.orientechnologies.orient.core;%0A%0Aimport com.orientechnologies.orient.core.shutdown.OShutdownHandler;%0Aimport org.junit.After;%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0A%0Aimport static org.testng.Assert.assertEquals;%0A%0A/**%0A * Created by tglman on 01/06/16.%0A */%0Apublic class OrientShutDownTest %7B%0A%0A  private int test = 0;%0A%0A  @Before%0A  public void before() %7B%0A    Orient.instance().startup();%0A  %7D%0A%0A  @After%0A  public void after() %7B%0A    Orient.instance().startup();%0A  %7D%0A%0A  @Test%0A  public void testShutdownHandler() %7B%0A%0A    Orient.instance().addShutdownHandler(new OShutdownHandler() %7B%0A      @Override%0A      public int getPriority() %7B%0A        return 0;%0A      %7D%0A%0A      @Override%0A      public void shutdown() throws Exception %7B%0A        test += 1;%0A      %7D%0A    %7D);%0A%0A    Orient.instance().shutdown();%0A    assertEquals(1, test);%0A    Orient.instance().startup();%0A    Orient.instance().shutdown();%0A    assertEquals(1, test);%0A%0A  %7D%0A%0A%7D%0A

add test for verify clean up of shutdown handlers