WorkerHelper { public static boolean checkExistingResource(final File storagePath, final String resource) { final File resourceFile = new File(new File(storagePath, DatabaseConfiguration.Paths.DATA.getFile().getName()), resource); boolean isExisting; if (resourceFile.getTotalSpace() > 0) { isExisting = true; } else { isExisting = false; } return isExisting; } private  WorkerHelper(); static void shredInputStream(final NodeWriteTrx wtx,
			final InputStream value, final Insert child); static boolean checkExistingResource(final File storagePath,
			final String resource); static XMLSerializer serializeXML(final Session session,
			final OutputStream out, final boolean serializeXMLDec,
			final boolean serializeRest, final Integer revision); static XMLSerializer serializeXML(final Session session,
			final OutputStream out, final boolean serializeXMLDec,
			final boolean serializeRest, final Long nodekey, final Integer revision); StringBuilder createStringBuilderObject(); static void closeWTX(final boolean abortTransaction,
			final NodeWriteTrx wtx, final Session ses, final Database dbase); static void closeRTX(final NodeReadTrx rtx, final Session ses,
			final Database dbase); IDAccessType validateAccessType(final String accessType); static WorkerHelper getInstance();  }
@Test public void testCheckExistingResource() { assertEquals("test check existing resource", true, WorkerHelper.checkExistingResource(TestHelper.PATHS.PATH1.getFile(), RESOURCENAME)); }