@SuppressWarnings("nls")
public class TestLocalBufferService {
@Test public void testCheckMemPropertyGotSet() throws Exception {
BufferServiceImpl svc = new BufferServiceImpl();
svc.setDiskDirectory(UnitTestUtil.getTestScratchPath()+"/teiid/1");
svc.setUseDisk(true);
svc.start();
// all the properties are set
assertTrue("Not Directory", svc.getBufferDirectory().isDirectory()); //$NON-NLS-1$
assertTrue("does not exist", svc.getBufferDirectory().exists()); //$NON-NLS-1$
assertTrue("does not end with one", svc.getBufferDirectory().getParent().endsWith("1")); //$NON-NLS-1$ //$NON-NLS-2$
assertTrue(svc.isUseDisk());
BufferManagerImpl mgr = (BufferManagerImpl) svc.getBufferManager();
assertTrue(((FileStorageManager)mgr.getStorageManager()).getDirectory().endsWith(svc.getBufferDirectory().getName()));
}