incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject [2/6] BLUR-97: Repackaged the agent to org.apache
Date Wed, 22 May 2013 02:07:37 GMT
http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/1485db70/src/contrib/blur-console/blur-agent/src/main/java/org/apache/blur/agent/types/Column.java
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-agent/src/main/java/org/apache/blur/agent/types/Column.java b/src/contrib/blur-console/blur-agent/src/main/java/org/apache/blur/agent/types/Column.java
new file mode 100644
index 0000000..9e63350
--- /dev/null
+++ b/src/contrib/blur-console/blur-agent/src/main/java/org/apache/blur/agent/types/Column.java
@@ -0,0 +1,73 @@
+package org.apache.blur.agent.types;
+
+public class Column {
+	String name;
+	String analyzer;
+	boolean fullText;
+	boolean live;
+
+	public Column(String name) {
+		this.name = name;
+	}
+
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	public String getAnalyzer() {
+		return analyzer;
+	}
+
+	public void setAnalyzer(String analyzer) {
+		this.analyzer = analyzer;
+	}
+
+	public boolean isLive() {
+		return live;
+	}
+
+	public void setLive(boolean live) {
+		this.live = live;
+	}
+
+	public boolean isFullText() {
+		return fullText;
+	}
+
+	public void setFullText(boolean fullText) {
+		this.fullText = fullText;
+	}
+
+	public boolean isSearchable() {
+		return (this.analyzer != null && this.analyzer != "");
+	}
+
+	@Override
+	public int hashCode() {
+		final int prime = 31;
+		int result = 1;
+		result = prime * result + ((name == null) ? 0 : name.hashCode());
+		return result;
+	}
+
+	@Override
+	public boolean equals(Object obj) {
+		if (this == obj)
+			return true;
+		if (obj == null)
+			return false;
+		if (getClass() != obj.getClass())
+			return false;
+		Column other = (Column) obj;
+		if (name == null) {
+			if (other.name != null)
+				return false;
+		} else if (!name.equals(other.name))
+			return false;
+		return true;
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/1485db70/src/contrib/blur-console/blur-agent/src/main/java/org/apache/blur/agent/types/Family.java
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-agent/src/main/java/org/apache/blur/agent/types/Family.java b/src/contrib/blur-console/blur-agent/src/main/java/org/apache/blur/agent/types/Family.java
new file mode 100644
index 0000000..9625670
--- /dev/null
+++ b/src/contrib/blur-console/blur-agent/src/main/java/org/apache/blur/agent/types/Family.java
@@ -0,0 +1,50 @@
+package org.apache.blur.agent.types;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class Family {
+	String name;
+	List<Column> columns = new ArrayList<Column>();
+
+	public Family(String name) {
+		this.name = name;
+	}
+
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	public List<Column> getColumns() {
+		return columns;
+	}
+
+	@Override
+	public int hashCode() {
+		final int prime = 31;
+		int result = 1;
+		result = prime * result + ((name == null) ? 0 : name.hashCode());
+		return result;
+	}
+
+	@Override
+	public boolean equals(Object obj) {
+		if (this == obj)
+			return true;
+		if (obj == null)
+			return false;
+		if (getClass() != obj.getClass())
+			return false;
+		Family other = (Family) obj;
+		if (name == null) {
+			if (other.name != null)
+				return false;
+		} else if (!name.equals(other.name))
+			return false;
+		return true;
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/1485db70/src/contrib/blur-console/blur-agent/src/main/java/org/apache/blur/agent/types/TimeHelper.java
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-agent/src/main/java/org/apache/blur/agent/types/TimeHelper.java b/src/contrib/blur-console/blur-agent/src/main/java/org/apache/blur/agent/types/TimeHelper.java
new file mode 100644
index 0000000..158f29a
--- /dev/null
+++ b/src/contrib/blur-console/blur-agent/src/main/java/org/apache/blur/agent/types/TimeHelper.java
@@ -0,0 +1,25 @@
+package org.apache.blur.agent.types;
+
+import java.util.Calendar;
+import java.util.Date;
+import java.util.TimeZone;
+
+public class TimeHelper {
+	public static Calendar now() {
+		return getAdjustedTime(new Date().getTime());
+	}
+
+	public static Calendar getAdjustedTime(long time) {
+		Calendar cal = Calendar.getInstance();
+		TimeZone z = cal.getTimeZone();
+		cal.add(Calendar.MILLISECOND, -(z.getOffset(time)));
+		return cal;
+	}
+	
+	public static Calendar getTimeAgo(int timeAgoInMS){
+		Calendar timeAgo = Calendar.getInstance();
+		timeAgo.setTimeInMillis(now().getTimeInMillis());
+		timeAgo.add(Calendar.MILLISECOND, -timeAgoInMS);
+		return timeAgo;
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/1485db70/src/contrib/blur-console/blur-agent/src/test/java/com/nearinfinity/AgentBaseTestClass.java
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-agent/src/test/java/com/nearinfinity/AgentBaseTestClass.java b/src/contrib/blur-console/blur-agent/src/test/java/com/nearinfinity/AgentBaseTestClass.java
deleted file mode 100644
index ef78912..0000000
--- a/src/contrib/blur-console/blur-agent/src/test/java/com/nearinfinity/AgentBaseTestClass.java
+++ /dev/null
@@ -1,46 +0,0 @@
-package com.nearinfinity;
-
-import java.util.List;
-import java.util.Properties;
-
-import org.junit.After;
-import org.junit.BeforeClass;
-import org.springframework.jdbc.core.JdbcTemplate;
-
-import com.nearinfinity.agent.connections.JdbcConnection;
-
-public abstract class AgentBaseTestClass {
-	protected static JdbcTemplate jdbc;
-
-	@BeforeClass
-	public static void setupDatabaseConnection() {
-		Properties props = new Properties();
-		props.setProperty("store.url", "jdbc:mysql://localhost/blurtools-test");
-		props.setProperty("store.user", "root");
-		props.setProperty("store.password", "");
-		jdbc = JdbcConnection.createDBConnection(props);
-	}
-
-	@After
-	public void tearDownDatabase() {
-		List<String> tables = jdbc.queryForList("select TABLE_NAME from information_schema.tables where table_schema = 'blurtools-test'",
-				String.class);
-
-		for (String table : tables) {
-			if (!"schema_migrations".equalsIgnoreCase(table)) {
-				jdbc.execute("truncate table " + table);
-			}
-		}
-	}
-	
-	protected void waitForThreadToSleep(Thread tiredThread, int catchupTime){
-		while(tiredThread.getState() != Thread.State.TIMED_WAITING){
-			// Wait until the thread goes to sleep
-		}
-		try {
-			Thread.sleep(catchupTime);
-			tiredThread.interrupt();
-		} catch (InterruptedException e) {}
-		return;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/1485db70/src/contrib/blur-console/blur-agent/src/test/java/com/nearinfinity/BlurAgentBaseTestClass.java
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-agent/src/test/java/com/nearinfinity/BlurAgentBaseTestClass.java b/src/contrib/blur-console/blur-agent/src/test/java/com/nearinfinity/BlurAgentBaseTestClass.java
deleted file mode 100644
index 8095e49..0000000
--- a/src/contrib/blur-console/blur-agent/src/test/java/com/nearinfinity/BlurAgentBaseTestClass.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package com.nearinfinity;
-
-import org.apache.blur.MiniCluster;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-
-public abstract class BlurAgentBaseTestClass extends AgentBaseTestClass {
-	@BeforeClass
-	public static void startBlur() {
-		MiniCluster.startDfs("./tmp");
-		MiniCluster.startZooKeeper("./tmp");
-		MiniCluster.startControllers(1);
-		MiniCluster.startShards(1);
-	}
-
-	@AfterClass
-	public static void stopBlur() {
-		MiniCluster.stopShards();
-		MiniCluster.stopControllers();
-		MiniCluster.shutdownZooKeeper();
-		MiniCluster.shutdownDfs();
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/1485db70/src/contrib/blur-console/blur-agent/src/test/java/com/nearinfinity/agent/cleaners/AgentCleanerTest.java
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-agent/src/test/java/com/nearinfinity/agent/cleaners/AgentCleanerTest.java b/src/contrib/blur-console/blur-agent/src/test/java/com/nearinfinity/agent/cleaners/AgentCleanerTest.java
deleted file mode 100644
index 1d35f86..0000000
--- a/src/contrib/blur-console/blur-agent/src/test/java/com/nearinfinity/agent/cleaners/AgentCleanerTest.java
+++ /dev/null
@@ -1,75 +0,0 @@
-package com.nearinfinity.agent.cleaners;
-
-import static org.junit.Assert.assertEquals;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Calendar;
-import java.util.List;
-
-import org.junit.Test;
-
-import com.nearinfinity.AgentBaseTestClass;
-import com.nearinfinity.agent.connections.cleaners.CleanerDatabaseConnection;
-import com.nearinfinity.agent.connections.cleaners.interfaces.CleanerDatabaseInterface;
-import com.nearinfinity.agent.types.TimeHelper;
-
-public class AgentCleanerTest extends AgentBaseTestClass {
-	private static CleanerDatabaseInterface database = new CleanerDatabaseConnection(jdbc);
-
-	@Test
-	public void shouldCleanStatsAndQueries() {
-		List<String> activeCollectors = new ArrayList<String>();
-		activeCollectors.addAll(Arrays.asList("queries", "hdfs"));
-
-		makeOldData();
-
-		Thread testStatsCleaner = new Thread(new AgentCleaners(activeCollectors, database), "Test Agent Thread");
-		testStatsCleaner.start();
-		waitForThreadToSleep(testStatsCleaner, 250);
-
-		int hdfsCount = jdbc.queryForInt("select count(id) from hdfs_stats");
-		int queryCount = jdbc.queryForInt("select count(id) from blur_queries");
-		assertEquals(0, hdfsCount);
-		assertEquals(0, queryCount);
-	}
-
-	@Test
-	public void shouldOnlyCleanStats() {
-		List<String> activeCollectors = new ArrayList<String>();
-		activeCollectors.add("hdfs");
-
-		makeOldData();
-
-		Thread testStatsCleaner = new Thread(new AgentCleaners(activeCollectors, database), "Test Agent Thread");
-		testStatsCleaner.start();
-		waitForThreadToSleep(testStatsCleaner, 250);
-
-		int hdfsCount = jdbc.queryForInt("select count(id) from hdfs_stats");
-		int queryCount = jdbc.queryForInt("select count(id) from blur_queries");
-		assertEquals(0, hdfsCount);
-		assertEquals(1, queryCount);
-	}
-
-	@Test
-	public void shouldOnlyCleanQueries() {
-		List<String> activeCollectors = new ArrayList<String>();
-		activeCollectors.add("queries");
-
-		makeOldData();
-
-		Thread testStatsCleaner = new Thread(new AgentCleaners(activeCollectors, database), "Test Agent Thread");
-		testStatsCleaner.start();
-		waitForThreadToSleep(testStatsCleaner, 250);
-
-		int hdfsCount = jdbc.queryForInt("select count(id) from hdfs_stats");
-		int queryCount = jdbc.queryForInt("select count(id) from blur_queries");
-		assertEquals(1, hdfsCount);
-		assertEquals(0, queryCount);
-	}
-
-	private void makeOldData() {
-		Calendar overTwoWeeksAgo = TimeHelper.getTimeAgo(16 * 24 * 60 * 60 * 1000);
-		jdbc.update("insert into hdfs_stats (created_at) values (?)", overTwoWeeksAgo);
-		jdbc.update("insert into blur_queries (state, updated_at, created_at) values (?,?,?)", 0, overTwoWeeksAgo, overTwoWeeksAgo);
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/1485db70/src/contrib/blur-console/blur-agent/src/test/java/com/nearinfinity/agent/cleaners/HdfsStatsCleanerTest.java
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-agent/src/test/java/com/nearinfinity/agent/cleaners/HdfsStatsCleanerTest.java b/src/contrib/blur-console/blur-agent/src/test/java/com/nearinfinity/agent/cleaners/HdfsStatsCleanerTest.java
deleted file mode 100644
index d26f507..0000000
--- a/src/contrib/blur-console/blur-agent/src/test/java/com/nearinfinity/agent/cleaners/HdfsStatsCleanerTest.java
+++ /dev/null
@@ -1,51 +0,0 @@
-package com.nearinfinity.agent.cleaners;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.fail;
-
-import java.util.Calendar;
-
-import org.junit.Test;
-
-import com.nearinfinity.AgentBaseTestClass;
-import com.nearinfinity.agent.connections.cleaners.CleanerDatabaseConnection;
-import com.nearinfinity.agent.connections.cleaners.interfaces.CleanerDatabaseInterface;
-import com.nearinfinity.agent.types.TimeHelper;
-
-public class HdfsStatsCleanerTest extends AgentBaseTestClass {
-	private static CleanerDatabaseInterface database = new CleanerDatabaseConnection(jdbc);
-
-	@Test
-	public void shouldDeleteOldStats() {
-		Calendar overTwoWeeksAgo = TimeHelper.getTimeAgo(16 * 24 * 60 * 60 * 1000);
-		jdbc.update("insert into hdfs_stats (created_at) values (?)", overTwoWeeksAgo);
-
-		Thread testStatsCleaner = new Thread(new HdfsStatsCleaner(database), "Hdfs Stats Cleaner Test Thread");
-		testStatsCleaner.start();
-		try {
-			testStatsCleaner.join();
-		} catch (InterruptedException e) {
-			fail("The test QueriesCleaner failed while waiting for it to finish!");
-		}
-
-		int updatedCount = jdbc.queryForInt("select count(id) from hdfs_stats");
-		assertEquals(0, updatedCount);
-	}
-	
-	@Test
-	public void shouldNotDeleteYoungStats() {
-		Calendar underTwoWeeksAgo = TimeHelper.getTimeAgo(8 * 24 * 60 * 60 * 1000);
-		jdbc.update("insert into hdfs_stats (created_at) values (?)", underTwoWeeksAgo);
-
-		Thread testStatsCleaner = new Thread(new HdfsStatsCleaner(database), "Hdfs Stats Cleaner Test Thread");
-		testStatsCleaner.start();
-		try {
-			testStatsCleaner.join();
-		} catch (InterruptedException e) {
-			fail("The test QueriesCleaner failed while waiting for it to finish!");
-		}
-
-		int updatedCount = jdbc.queryForInt("select count(id) from hdfs_stats");
-		assertEquals(1, updatedCount);
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/1485db70/src/contrib/blur-console/blur-agent/src/test/java/com/nearinfinity/agent/cleaners/QueryCleanerTest.java
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-agent/src/test/java/com/nearinfinity/agent/cleaners/QueryCleanerTest.java b/src/contrib/blur-console/blur-agent/src/test/java/com/nearinfinity/agent/cleaners/QueryCleanerTest.java
deleted file mode 100644
index 23fb376..0000000
--- a/src/contrib/blur-console/blur-agent/src/test/java/com/nearinfinity/agent/cleaners/QueryCleanerTest.java
+++ /dev/null
@@ -1,104 +0,0 @@
-package com.nearinfinity.agent.cleaners;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.fail;
-
-import java.util.Calendar;
-
-import org.junit.Test;
-
-import com.nearinfinity.AgentBaseTestClass;
-import com.nearinfinity.agent.connections.cleaners.CleanerDatabaseConnection;
-import com.nearinfinity.agent.connections.cleaners.interfaces.CleanerDatabaseInterface;
-import com.nearinfinity.agent.types.TimeHelper;
-
-public class QueryCleanerTest extends AgentBaseTestClass {
-	private static CleanerDatabaseInterface database = new CleanerDatabaseConnection(jdbc);
-
-	@Test
-	public void shouldExpireOldRunningQueries() {
-		Calendar timeOfQuery = TimeHelper.getTimeAgo(3 * 60 * 1000);
-		jdbc.update("insert into blur_queries (state, updated_at, created_at) values (?,?,?)", 0, timeOfQuery, timeOfQuery);
-
-		Thread testQueryCleaner = new Thread(new QueriesCleaner(database), "Query Test Thread");
-		testQueryCleaner.start();
-		try {
-			testQueryCleaner.join();
-		} catch (InterruptedException e) {
-			fail("The test QueriesCleaner failed while waiting for it to finish!");
-		}
-
-		int state = jdbc.queryForInt("select state from blur_queries limit 0, 1");
-		assertEquals(1, state);
-	}
-	
-	@Test
-	public void shouldNotExpireNewlyRunningQueries() {		
-		Calendar timeOfQuery = TimeHelper.getTimeAgo(1 * 60 * 1000);
-		jdbc.update("insert into blur_queries (state, updated_at, created_at) values (?,?,?)", 0, timeOfQuery, timeOfQuery);
-
-		Thread testQueryCleaner = new Thread(new QueriesCleaner(database), "Query Test Thread");
-		testQueryCleaner.start();
-		try {
-			testQueryCleaner.join();
-		} catch (InterruptedException e) {
-			fail("The test QueriesCleaner failed while waiting for it to finish!");
-		}
-
-		int state = jdbc.queryForInt("select state from blur_queries limit 0, 1");
-		assertEquals(0, state);
-	}
-	
-	@Test
-	public void shouldNotExpireExpiredRunningQueries() {		
-		Calendar timeOfQuery = TimeHelper.getTimeAgo(1 * 60 * 1000);
-		// a more recent time, for testing to see if a query is updated after it is created
-		Calendar timeOfUpdate = TimeHelper.getTimeAgo(1 * 30 * 1000);
-		jdbc.update("insert into blur_queries (state, updated_at, created_at) values (?,?,?)", 1, timeOfQuery, timeOfQuery);
-
-		Thread testQueryCleaner = new Thread(new QueriesCleaner(database), "Query Test Thread");
-		testQueryCleaner.start();
-		try {
-			testQueryCleaner.join();
-		} catch (InterruptedException e) {
-			fail("The test QueriesCleaner failed while waiting for it to finish!");
-		}
-
-		int updatedCount = jdbc.queryForInt("select count(id) from blur_queries where updated_at > ?", timeOfUpdate);
-		assertEquals(0, updatedCount);
-	}
-	
-	@Test
-	public void shouldDeleteOldQueries() {		
-		Calendar timeOfQuery = TimeHelper.getTimeAgo(3 * 60 * 60 * 1000);
-		jdbc.update("insert into blur_queries (state, updated_at, created_at) values (?,?,?)", 1, timeOfQuery, timeOfQuery);
-
-		Thread testQueryCleaner = new Thread(new QueriesCleaner(database), "Query Test Thread");
-		testQueryCleaner.start();
-		try {
-			testQueryCleaner.join();
-		} catch (InterruptedException e) {
-			fail("The test QueriesCleaner failed while waiting for it to finish!");
-		}
-
-		int updatedCount = jdbc.queryForInt("select count(id) from blur_queries");
-		assertEquals(0, updatedCount);
-	}
-	
-	@Test
-	public void shouldNotDeleteYoungQueries() {		
-		Calendar timeOfQuery = TimeHelper.getTimeAgo(1 * 60 * 60 * 1000);
-		jdbc.update("insert into blur_queries (state, updated_at, created_at) values (?,?,?)", 1, timeOfQuery, timeOfQuery);
-
-		Thread testQueryCleaner = new Thread(new QueriesCleaner(database), "Query Test Thread");
-		testQueryCleaner.start();
-		try {
-			testQueryCleaner.join();
-		} catch (InterruptedException e) {
-			fail("The test QueriesCleaner failed while waiting for it to finish!");
-		}
-
-		int updatedCount = jdbc.queryForInt("select count(id) from blur_queries");
-		assertEquals(1, updatedCount);
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/1485db70/src/contrib/blur-console/blur-agent/src/test/java/com/nearinfinity/agent/collectors/blur/query/QueryCollectorTest.java
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-agent/src/test/java/com/nearinfinity/agent/collectors/blur/query/QueryCollectorTest.java b/src/contrib/blur-console/blur-agent/src/test/java/com/nearinfinity/agent/collectors/blur/query/QueryCollectorTest.java
deleted file mode 100644
index f73782f..0000000
--- a/src/contrib/blur-console/blur-agent/src/test/java/com/nearinfinity/agent/collectors/blur/query/QueryCollectorTest.java
+++ /dev/null
@@ -1,53 +0,0 @@
-package com.nearinfinity.agent.collectors.blur.query;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.fail;
-
-import java.io.IOException;
-
-import org.apache.blur.MiniCluster;
-import org.apache.blur.thrift.BlurClient;
-import org.apache.blur.thrift.generated.AnalyzerDefinition;
-import org.apache.blur.thrift.generated.Blur.Iface;
-import org.apache.blur.thrift.generated.BlurException;
-import org.apache.blur.thrift.generated.BlurQuery;
-import org.apache.blur.thrift.generated.ScoreType;
-import org.apache.blur.thrift.generated.SimpleQuery;
-import org.apache.blur.thrift.generated.TableDescriptor;
-import org.apache.thrift.TException;
-import org.junit.Test;
-
-import com.nearinfinity.BlurAgentBaseTestClass;
-import com.nearinfinity.agent.connections.blur.BlurDatabaseConnection;
-
-public class QueryCollectorTest extends BlurAgentBaseTestClass {
-	private static BlurDatabaseConnection database = new BlurDatabaseConnection(jdbc);
-
-	@Test
-	public void shouldAddQueriesToDB() throws BlurException, TException, IOException {
-		Iface blurConnection = BlurClient.getClient(MiniCluster.getControllerConnectionStr());
-
-
-		TableDescriptor td = new TableDescriptor(); 
-		td.setTableUri(MiniCluster.getFileSystemUri() + "/blur-tables/test-table");
-		td.setAnalyzerDefinition(new AnalyzerDefinition());
-		td.setName("test");
-
-		blurConnection.createTable(td);
-		
-		BlurQuery query = new BlurQuery();
-		query.setSimpleQuery(new SimpleQuery("test.col:*", true, ScoreType.SUPER, null, null));
-		blurConnection.query("test", query);
-		
-		Thread testQueryCollector = new Thread(new QueryCollector(BlurClient.getClient(MiniCluster.getControllerConnectionStr()), "test",
-				1, database), "Query Test Thread");
-		testQueryCollector.start();
-		try {
-			testQueryCollector.join();
-		} catch (InterruptedException e) {
-			fail("The test QueryCollector failed while waiting for it to finish!");
-		}
-		int query_count = jdbc.queryForInt("select count(id) from blur_queries");
-		assertEquals(1, query_count);
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/1485db70/src/contrib/blur-console/blur-agent/src/test/java/com/nearinfinity/agent/collectors/hdfs/HdfsCollectorTest.java
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-agent/src/test/java/com/nearinfinity/agent/collectors/hdfs/HdfsCollectorTest.java b/src/contrib/blur-console/blur-agent/src/test/java/com/nearinfinity/agent/collectors/hdfs/HdfsCollectorTest.java
deleted file mode 100644
index a62de5f..0000000
--- a/src/contrib/blur-console/blur-agent/src/test/java/com/nearinfinity/agent/collectors/hdfs/HdfsCollectorTest.java
+++ /dev/null
@@ -1,67 +0,0 @@
-package com.nearinfinity.agent.collectors.hdfs;
-
-import static org.junit.Assert.assertEquals;
-
-import java.io.IOException;
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.blur.MiniCluster;
-import org.junit.Before;
-import org.junit.Test;
-
-import com.nearinfinity.BlurAgentBaseTestClass;
-import com.nearinfinity.agent.connections.hdfs.HdfsDatabaseConnection;
-import com.nearinfinity.agent.connections.hdfs.interfaces.HdfsDatabaseInterface;
-import com.nearinfinity.agent.exceptions.HdfsThreadException;
-
-public class HdfsCollectorTest extends BlurAgentBaseTestClass {
-	private static HdfsDatabaseInterface database = new HdfsDatabaseConnection(jdbc);
-	private static URI hdfsUri;
-
-	@Before
-	public void setup() throws IOException {
-		hdfsUri = MiniCluster.getFileSystemUri();
-	}
-
-	@Test
-	public void shouldCreateHdfs() throws HdfsThreadException {
-		List<String> activeCollectors = new ArrayList<String>();
-
-		Thread testHdfsCollector = new Thread(new HdfsCollector("TestHDFS", hdfsUri.toString(), "hdfs://localhost:55314", null,
-				activeCollectors, database), "Hdfs Test Thread");
-		testHdfsCollector.start();
-		waitForThreadToSleep(testHdfsCollector, 250);
-
-		int hdfsCount = jdbc.queryForInt("select count(id) from hdfs");
-		assertEquals(1, hdfsCount);
-	}
-
-	@Test
-	public void shouldCollectStatsWhenActive() throws HdfsThreadException {
-		List<String> activeCollectors = new ArrayList<String>();
-		activeCollectors.add("hdfs");
-
-		Thread testHdfsCollector = new Thread(new HdfsCollector("TestHDFS", hdfsUri.toString(), "hdfs://localhost:55314", null,
-				activeCollectors, database), "Hdfs Test Thread");
-		testHdfsCollector.start();
-		waitForThreadToSleep(testHdfsCollector, 250);
-
-		int statsCount = jdbc.queryForInt("select count(id) from hdfs_stats");
-		assertEquals(1, statsCount);
-	}
-
-	@Test
-	public void shouldNotCollectStatsWithoutActive() throws HdfsThreadException {
-		List<String> activeCollectors = new ArrayList<String>();
-
-		Thread testHdfsCollector = new Thread(new HdfsCollector("TestHDFS", hdfsUri.toString(), "hdfs://localhost:55314", null,
-				activeCollectors, database), "Hdfs Test Thread");
-		testHdfsCollector.start();
-		waitForThreadToSleep(testHdfsCollector, 250);
-
-		int statsCount = jdbc.queryForInt("select count(id) from hdfs_stats");
-		assertEquals(0, statsCount);
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/1485db70/src/contrib/blur-console/blur-agent/src/test/java/com/nearinfinity/agent/collectors/hdfs/HdfsStatCollectorTest.java
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-agent/src/test/java/com/nearinfinity/agent/collectors/hdfs/HdfsStatCollectorTest.java b/src/contrib/blur-console/blur-agent/src/test/java/com/nearinfinity/agent/collectors/hdfs/HdfsStatCollectorTest.java
deleted file mode 100644
index cc67fc2..0000000
--- a/src/contrib/blur-console/blur-agent/src/test/java/com/nearinfinity/agent/collectors/hdfs/HdfsStatCollectorTest.java
+++ /dev/null
@@ -1,54 +0,0 @@
-package com.nearinfinity.agent.collectors.hdfs;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.fail;
-
-import java.io.IOException;
-import java.net.URI;
-
-import org.apache.blur.MiniCluster;
-import org.junit.Before;
-import org.junit.Test;
-
-import com.nearinfinity.BlurAgentBaseTestClass;
-import com.nearinfinity.agent.connections.hdfs.HdfsDatabaseConnection;
-import com.nearinfinity.agent.connections.hdfs.interfaces.HdfsDatabaseInterface;
-
-public class HdfsStatCollectorTest extends BlurAgentBaseTestClass {
-	private static HdfsDatabaseInterface database = new HdfsDatabaseConnection(jdbc);
-	private static URI hdfsUri;
-
-	@Before
-	public void setup() throws IOException {
-		hdfsUri = MiniCluster.getFileSystemUri();
-	}
-
-	@Test
-	public void shouldNotInsertStatsWithoutParent() {
-		Thread testHdfsStatsCollector = new Thread(new HdfsStatsCollector("Test HDFS", hdfsUri, null, database), "HdfsStat Test Thread");
-		testHdfsStatsCollector.start();
-		try {
-			testHdfsStatsCollector.join();
-		} catch (InterruptedException e) {
-			fail("The test HdfsStatCollector failed while waiting for it to finish!");
-		}
-
-		int statsCount = jdbc.queryForInt("select count(id) from hdfs_stats");
-		assertEquals(0, statsCount);
-	}
-	
-	@Test
-	public void shouldInsertStats() {
-		jdbc.update("insert into hdfs (name) values (?)", "TestHdfs");
-		Thread testHdfsStatsCollector = new Thread(new HdfsStatsCollector("TestHdfs", hdfsUri, null, database), "HdfsStat Test Thread");
-		testHdfsStatsCollector.start();
-		try {
-			testHdfsStatsCollector.join();
-		} catch (InterruptedException e) {
-			fail("The test HdfsStatCollector failed while waiting for it to finish!");
-		}
-
-		int statsCount = jdbc.queryForInt("select count(id) from hdfs_stats");
-		assertEquals(1, statsCount);
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/1485db70/src/contrib/blur-console/blur-agent/src/test/java/com/nearinfinity/agent/notifications/MailerTest.java
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-agent/src/test/java/com/nearinfinity/agent/notifications/MailerTest.java b/src/contrib/blur-console/blur-agent/src/test/java/com/nearinfinity/agent/notifications/MailerTest.java
deleted file mode 100644
index 5587942..0000000
--- a/src/contrib/blur-console/blur-agent/src/test/java/com/nearinfinity/agent/notifications/MailerTest.java
+++ /dev/null
@@ -1,259 +0,0 @@
-package com.nearinfinity.agent.notifications;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import java.lang.reflect.Field;
-import java.util.Collection;
-import java.util.Properties;
-
-import javax.mail.MessagingException;
-
-import org.junit.Test;
-import org.springframework.util.ReflectionUtils;
-import org.subethamail.wiser.Wiser;
-
-import com.nearinfinity.agent.notifications.Mailer;
-
-public class MailerTest {
-
-	@Test
-	public void testSingletons() {
-		// getter no props
-		Mailer mailer = new Mailer(new Properties());
-		assertFieldEquals("Send mail should be false", mailer, "sendMail", false);
-		assertFieldEquals("Recipients shouldn't have been set because sendMail is false.", mailer, "recipients", null);
-		assertFieldEquals("Sender should be null", mailer, "automatedSender", null);
-
-		// getter with props
-		Properties props = new Properties();
-		props.setProperty("mail.enabled", "true");
-		props.setProperty("mail.host", "localhost");
-		props.setProperty("mail.port", "25");
-		props.setProperty("mail.sender.username", "crohr");
-		props.setProperty("mail.from.address", "crohr");
-		props.setProperty("mail.sender.password", "password");
-		props.setProperty("mail.recipients", "crohr@nearinfinity.com|bmarcur@nearinfinity.com");
-		mailer = new Mailer(props);
-		assertFieldEquals("Send mail should be true", mailer, "sendMail", true);
-		assertCollectionFieldEquals("There should be 2 valid recipients", mailer, "recipients", 2);
-		assertFieldEquals("Sender should be crohr", mailer, "automatedSender", "crohr");
-	}
-
-	@Test
-	public void testMailerSetupInvalidAddress() {
-		Properties props = new Properties();
-		props.setProperty("mail.enabled", "true");
-		props.setProperty("mail.host", "localhost");
-		props.setProperty("mail.port", "25");
-		props.setProperty("mail.sender.username", "crohr");
-		props.setProperty("mail.from.address", "crohr");
-		props.setProperty("mail.sender.password", "password");
-		props.setProperty("mail.recipients", "test@nearinfinity com");
-		Mailer mailer = new Mailer(props);
-
-		assertCollectionFieldEquals("There should be no valid recipients", mailer, "recipients", 0);
-		assertFieldEquals("Sender should be crohr", mailer, "automatedSender", "crohr");
-	}
-
-	@Test
-	public void testMailerSetupWithUniqueDomain() {
-		Properties props = new Properties();
-		props.setProperty("mail.enabled", "true");
-		props.setProperty("mail.host", "localhost");
-		props.setProperty("mail.port", "25");
-		props.setProperty("mail.sender.username", "crohr");
-		props.setProperty("mail.from.address", "crohr");
-		props.setProperty("mail.sender.password", "password");
-		props.setProperty("mail.recipients", "crohr@abc");
-		Mailer mailer = new Mailer(props);
-
-		assertCollectionFieldEquals("There should be 1 valid recipient", mailer, "recipients", 1);
-		assertFieldEquals("Sender should be crohr", mailer, "automatedSender", "crohr");
-	}
-	
-	@Test
-	public void testSendMessageMailerDisabled() {
-		Wiser server = new Wiser(2500);
-		server.start();
-		
-		Properties props = new Properties();
-		props.setProperty("mail.enabled", "false");
-		Mailer mailer = new Mailer(props);
-		mailer.sendMessage("Test Message Subject", "Test Message Body");
-		
-		server.stop();
-		assertTrue(server.getMessages().size() == 0);
-	}
-	
-	@Test
-	public void testSendMessageNoRecipients() {
-		Wiser server = new Wiser(2500);
-		server.start();
-		
-		Properties props = new Properties();
-		props.setProperty("mail.enabled", "true");
-		props.setProperty("mail.host", "localhost");
-		props.setProperty("mail.port", "25");
-		props.setProperty("mail.sender.username", "crohr");
-		props.setProperty("mail.from.address", "crohr");
-		props.setProperty("mail.sender.password", "password");
-		Mailer mailer = new Mailer(props);
-		mailer.sendMessage("Test Message Subject", "Test Message Body");
-		
-		server.stop();
-		assertTrue(server.getMessages().size() == 0);
-	}
-	
-	@Test
-	public void testSendMessage() throws MessagingException {
-		Wiser server = new Wiser(2500);
-		server.start();
-		
-		Properties props = new Properties();
-		props.setProperty("mail.enabled", "true");
-		props.setProperty("mail.host", "localhost");
-		props.setProperty("mail.port", "2500");
-		props.setProperty("mail.sender.username", "crohr");
-		props.setProperty("mail.from.address", "crohr");
-		props.setProperty("mail.sender.password", "password");
-		props.setProperty("mail.recipients", "crohr@nearinfinity.com|bmarcur@nearinfinity.com");
-		Mailer mailer = new Mailer(props);
-		mailer.sendMessage("Test Message Subject", "Test Message Body");
-		
-		server.stop();
-		assertTrue(server.getMessages().size() == 2);
-		assertEquals("Test Message Subject", server.getMessages().get(0).getMimeMessage().getSubject());
-	}
-
-//	@Test
-//	public void testSendZookeeperNotice() throws MessagingException, IOException {
-//		Wiser server = new Wiser(2500);
-//		server.start();
-//
-//		setupActiveMailer("crohr@nearinfinity.com").notifyZookeeperOffline("ZK1");
-//
-//		server.stop();
-//
-//		assertProperMessageSent("Zookeeper", "ZK1", server);
-//	}
-//	
-//	@Test
-//	public void testSendControllersNoticeSingleNode() throws MessagingException, IOException {
-//		Wiser server = new Wiser(2500);
-//		server.start();
-//
-//		List<String> names = new ArrayList<String>();
-//		names.add("C1");
-//		
-//		setupActiveMailer("crohr@nearinfinity.com").notifyControllerOffline(names);
-//
-//		server.stop();
-//
-//		assertProperMessageSent("Controllers", "C1", server);
-//	}
-//	
-//	@Test
-//	public void testSendControllersNoticeMultiNode() throws MessagingException, IOException {
-//		Wiser server = new Wiser(2500);
-//		server.start();
-//
-//		List<String> names = new ArrayList<String>();
-//		names.add("C1");
-//		names.add("C2");
-//		
-//		setupActiveMailer("crohr@nearinfinity.com").notifyControllerOffline(names);
-//
-//		server.stop();
-//
-//		assertProperMultiMessageSent("Controllers", names, server);
-//	}
-//	
-//	@Test
-//	public void testSendShardsNoticeSingleNode() throws MessagingException, IOException {
-//		Wiser server = new Wiser(2500);
-//		server.start();
-//
-//		List<String> names = new ArrayList<String>();
-//		names.add("S1");
-//		
-//		setupActiveMailer("crohr@nearinfinity.com").notifyShardOffline(names);
-//
-//		server.stop();
-//
-//		assertProperMessageSent("Shards", "S1", server);
-//	}
-//	
-//	@Test
-//	public void testSendShardsNoticeMultiNode() throws MessagingException, IOException {
-//		Wiser server = new Wiser(2500);
-//		server.start();
-//
-//		List<String> names = new ArrayList<String>();
-//		names.add("S1");
-//		names.add("S2");
-//		
-//		setupActiveMailer("crohr@nearinfinity.com").notifyShardOffline(names);
-//
-//		server.stop();
-//
-//		assertProperMultiMessageSent("Shards", names, server);
-//	}
-//
-//	@Test
-//	public void testNoMessageSentWithNoRecipients() {
-//		Wiser server = new Wiser(2500);
-//		server.start();
-//
-//		List<String> names = new ArrayList<String>();
-//		names.add("S1");
-//		setupActiveMailer("").notifyShardOffline(names);
-//
-//		server.stop();
-//
-//		assertTrue(server.getMessages().size() == 0);
-//	}
-
-//	private Mailer setupActiveMailer(String recipients) {
-//		Properties props = new Properties();
-//		props.setProperty("mail.host", "localhost");
-//		props.setProperty("mail.port", "2500");
-//		props.setProperty("mail.sender.username", "crohr");
-//		props.setProperty("mail.sender.password", "password");
-//		props.setProperty("mail.recipients", recipients);
-//		return new Mailer(props);
-//	}
-//
-//	private void assertProperMessageSent(String type, String name, Wiser server) throws MessagingException, IOException {
-//		assertTrue(server.getMessages().size() == 1);
-//		Iterator<WiserMessage> emailIter = server.getMessages().iterator();
-//		WiserMessage email = (WiserMessage) emailIter.next();
-//		assertTrue(email.getMimeMessage().getSubject().equals("Blur Console: " + type + " [" + name + "] may have gone offline!"));
-//		assertEquals("Blur Console has received notice that " + type + " [" + name
-//				+ "] has recently gone offline, if this was expected please ignore this email.",
-//				StringUtils.trim((String) email.getMimeMessage().getContent()));
-//	}
-//	
-//	private void assertProperMultiMessageSent(String type, List<String> names, Wiser server) throws MessagingException, IOException {
-//		assertTrue(server.getMessages().size() == 1);
-//		Iterator<WiserMessage> emailIter = server.getMessages().iterator();
-//		WiserMessage email = (WiserMessage) emailIter.next();
-//		assertTrue(email.getMimeMessage().getSubject().equals("Blur Console: Multiple " + type + " may have gone offline!"));
-//		assertEquals("Blur Console has received notice that " + type + " [" + StringUtils.join(names, "','")
-//				+ "] have recently gone offline, if this was expected please ignore this email.",
-//				StringUtils.trim((String) email.getMimeMessage().getContent()));
-//	}
-
-	private void assertFieldEquals(String message, Object object, String fieldName, Object value) {
-		Field field = ReflectionUtils.findField(object.getClass(), fieldName);
-		ReflectionUtils.makeAccessible(field);
-		assertEquals(message, value, ReflectionUtils.getField(field, object));
-	}
-
-	@SuppressWarnings("unchecked")
-	private void assertCollectionFieldEquals(String message, Object object, String fieldName, int expectedCollectionSize) {
-		Field field = ReflectionUtils.findField(object.getClass(), fieldName);
-		ReflectionUtils.makeAccessible(field);
-		assertEquals(message, expectedCollectionSize, ((Collection<Object>) ReflectionUtils.getField(field, object)).size());
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/1485db70/src/contrib/blur-console/blur-agent/src/test/java/com/nearinfinity/agent/notifications/MessengerTest.java
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-agent/src/test/java/com/nearinfinity/agent/notifications/MessengerTest.java b/src/contrib/blur-console/blur-agent/src/test/java/com/nearinfinity/agent/notifications/MessengerTest.java
deleted file mode 100644
index 2e95e8a..0000000
--- a/src/contrib/blur-console/blur-agent/src/test/java/com/nearinfinity/agent/notifications/MessengerTest.java
+++ /dev/null
@@ -1,100 +0,0 @@
-package com.nearinfinity.agent.notifications;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import java.lang.reflect.Field;
-import java.util.Collection;
-import java.util.Properties;
-
-import javax.mail.MessagingException;
-
-import org.junit.Test;
-import org.springframework.util.ReflectionUtils;
-
-public class MessengerTest {
-
-	@Test
-	public void testSingletons() {
-		// getter no props
-		Messenger mailer = new Messenger(new Properties());
-		assertFieldEquals("Send message should be false", mailer, "sendMessage", false);
-		assertFieldEquals("Recipients shouldn't have been set because sendMessage is false.", mailer, "recipients", null);
-
-		// getter with props
-		Properties props = new Properties();
-		props.setProperty("messenger.enabled", "true");
-		props.setProperty("messenger.host", "localhost");
-		props.setProperty("messenger.port", "25");
-		props.setProperty("messenger.user", "crohr");
-		props.setProperty("messenger.password", "password");
-		props.setProperty("messenger.recipients", "crohr@nearinfinity.com|bmarcur@nearinfinity.com");
-		mailer = new Messenger(props);
-		assertFieldEquals("Send messenger should be true", mailer, "sendMessage", true);
-		assertCollectionFieldEquals("There should be 2 valid recipients", mailer, "recipients", 2);
-	}
-
-	
-	@Test
-	public void testSendMessageMessengerDisabled() {
-		XMPPEmbeddedServer.startServer(2500);
-		
-		Properties props = new Properties();
-		props.setProperty("messenger.enabled", "false");
-		Messenger mailer = new Messenger(props);
-		mailer.sendMessage("Test Message");
-		
-		XMPPEmbeddedServer.stopServer();
-		assertTrue(XMPPEmbeddedServer.getMessages().size() == 0);
-	}
-	
-	@Test
-	public void testSendMessageNoRecipients() {
-		XMPPEmbeddedServer.startServer(2500);
-		
-		Properties props = new Properties();
-		props.setProperty("messenger.enabled", "true");
-		props.setProperty("messenger.host", "localhost");
-		props.setProperty("messenger.port", "2500");
-		props.setProperty("messenger.user", "crohr");
-		props.setProperty("messenger.password", "password");
-		Messenger mailer = new Messenger(props);
-		mailer.sendMessage("Test Message");
-		
-		XMPPEmbeddedServer.stopServer();
-		assertTrue(XMPPEmbeddedServer.getMessages().size() == 0);
-	}
-	
-	@Test
-	public void testSendMessage() throws MessagingException {
-		XMPPEmbeddedServer.startServer(2500);
-		
-		Properties props = new Properties();
-		props.setProperty("messenger.enabled", "true");
-		props.setProperty("messenger.host", "localhost");
-		props.setProperty("messenger.port", "2500");
-		props.setProperty("messenger.user", "crohr");
-		props.setProperty("messenger.password", "password");
-		props.setProperty("messenger.recipients", "crohr@nearinfinity.com|bmarcur@nearinfinity.com");
-		Messenger mailer = new Messenger(props);
-		mailer.sendMessage("Test Message");
-		
-		XMPPEmbeddedServer.stopServer();
-		assertTrue(XMPPEmbeddedServer.getMessages().size() == 0);
-		//assertEquals("Test Message", XMPPEmbeddedServer.getMessages().get(0));
-	}
-	
-	private void assertFieldEquals(String message, Object object, String fieldName, Object value) {
-		Field field = ReflectionUtils.findField(object.getClass(), fieldName);
-		ReflectionUtils.makeAccessible(field);
-		assertEquals(message, value, ReflectionUtils.getField(field, object));
-	}
-
-	@SuppressWarnings("unchecked")
-	private void assertCollectionFieldEquals(String message, Object object, String fieldName, int expectedCollectionSize) {
-		Field field = ReflectionUtils.findField(object.getClass(), fieldName);
-		ReflectionUtils.makeAccessible(field);
-		assertEquals(message, expectedCollectionSize, ((Collection<Object>) ReflectionUtils.getField(field, object)).size());
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/1485db70/src/contrib/blur-console/blur-agent/src/test/java/com/nearinfinity/agent/notifications/NotifierTest.java
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-agent/src/test/java/com/nearinfinity/agent/notifications/NotifierTest.java b/src/contrib/blur-console/blur-agent/src/test/java/com/nearinfinity/agent/notifications/NotifierTest.java
deleted file mode 100644
index ca4b161..0000000
--- a/src/contrib/blur-console/blur-agent/src/test/java/com/nearinfinity/agent/notifications/NotifierTest.java
+++ /dev/null
@@ -1,5 +0,0 @@
-package com.nearinfinity.agent.notifications;
-
-public class NotifierTest {
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/1485db70/src/contrib/blur-console/blur-agent/src/test/java/com/nearinfinity/agent/notifications/XMPPEmbeddedServer.java
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-agent/src/test/java/com/nearinfinity/agent/notifications/XMPPEmbeddedServer.java b/src/contrib/blur-console/blur-agent/src/test/java/com/nearinfinity/agent/notifications/XMPPEmbeddedServer.java
deleted file mode 100644
index ebe728b..0000000
--- a/src/contrib/blur-console/blur-agent/src/test/java/com/nearinfinity/agent/notifications/XMPPEmbeddedServer.java
+++ /dev/null
@@ -1,95 +0,0 @@
-package com.nearinfinity.agent.notifications;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.io.PrintWriter;
-import java.net.ServerSocket;
-import java.net.Socket;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-public class XMPPEmbeddedServer implements Runnable {
-	private static final Log log = LogFactory.getLog(XMPPEmbeddedServer.class);
-	private static Thread serverThread;
-	private static XMPPEmbeddedServer server;
-	private ServerSocket socket;
-	
-	public static void startServer(int port) {
-		server = new XMPPEmbeddedServer(port);
-		serverThread = new Thread(server);
-		serverThread.start();
-	}
-	
-	public static void stopServer() {
-		server.closeServer();
-		serverThread.interrupt();
-	}
-	
-	public static List<Object> getMessages() {
-		return new ArrayList<Object>();
-	}
-	
-	private XMPPEmbeddedServer(int port) {
-		try {
-			log.info("Starting IM Server *:" + port);
-			socket = new ServerSocket(port);
-			log.info("IM Server started *:" + port);
-		} catch (IOException e) {
-			log.error("Error creating IM server:" + e.getMessage());
-			stopServer();
-		}
-	}
-
-	@Override
-	public void run() {
-		if (socket == null) {
-			log.info("IM Server has not been configured.");
-		} else {
-			while(true) {
-				if (socket != null) {
-					try {
-						Socket accept = socket.accept();
-						System.out.println("got a connection");
-						
-						PrintWriter out = new PrintWriter(accept.getOutputStream(), true);
-						out.println("<stream id='xxxx' from='192.168.0.12:5222' xmlns='jabber:client'/>");
-						
-						BufferedReader in = new BufferedReader(new InputStreamReader(accept.getInputStream()));
-						
-						String inputLine;
-						while ((inputLine = in.readLine()) != null) { 
-							System.out.println(inputLine);
-						}
-						
-//						out = new PrintWriter(accept.getOutputStream(), true);
-//						out.println("<iq type='result' id='reg2'/>");
-						
-						
-						
-					} catch (IOException e) {
-//						e.printStackTrace();
-					}
-				}
-			}
-		}
-	}
-	
-	public void closeServer() {
-		if (socket != null) {
-			try {
-				log.info("Shutting down IM server");
-				socket.close();
-				log.info("IM server has been shut down");
-			} catch (IOException e) {
-				log.error("There was a problem trying to close IM server: " + e.getMessage());
-			}
-			socket = null;
-		}
-	}
-	
-	
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/1485db70/src/contrib/blur-console/blur-agent/src/test/java/org/apache/blur/agent/cleaners/AgentCleanerTest.java
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-agent/src/test/java/org/apache/blur/agent/cleaners/AgentCleanerTest.java b/src/contrib/blur-console/blur-agent/src/test/java/org/apache/blur/agent/cleaners/AgentCleanerTest.java
new file mode 100644
index 0000000..1f6676b
--- /dev/null
+++ b/src/contrib/blur-console/blur-agent/src/test/java/org/apache/blur/agent/cleaners/AgentCleanerTest.java
@@ -0,0 +1,77 @@
+package org.apache.blur.agent.cleaners;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Calendar;
+import java.util.List;
+
+import org.apache.blur.agent.cleaners.AgentCleaners;
+import org.apache.blur.agent.connections.cleaners.CleanerDatabaseConnection;
+import org.apache.blur.agent.connections.cleaners.interfaces.CleanerDatabaseInterface;
+import org.apache.blur.agent.test.AgentBaseTestClass;
+import org.apache.blur.agent.types.TimeHelper;
+import org.junit.Test;
+
+
+public class AgentCleanerTest extends AgentBaseTestClass {
+	private static CleanerDatabaseInterface database = new CleanerDatabaseConnection(jdbc);
+
+	@Test
+	public void shouldCleanStatsAndQueries() {
+		List<String> activeCollectors = new ArrayList<String>();
+		activeCollectors.addAll(Arrays.asList("queries", "hdfs"));
+
+		makeOldData();
+
+		Thread testStatsCleaner = new Thread(new AgentCleaners(activeCollectors, database), "Test Agent Thread");
+		testStatsCleaner.start();
+		waitForThreadToSleep(testStatsCleaner, 250);
+
+		int hdfsCount = jdbc.queryForInt("select count(id) from hdfs_stats");
+		int queryCount = jdbc.queryForInt("select count(id) from blur_queries");
+		assertEquals(0, hdfsCount);
+		assertEquals(0, queryCount);
+	}
+
+	@Test
+	public void shouldOnlyCleanStats() {
+		List<String> activeCollectors = new ArrayList<String>();
+		activeCollectors.add("hdfs");
+
+		makeOldData();
+
+		Thread testStatsCleaner = new Thread(new AgentCleaners(activeCollectors, database), "Test Agent Thread");
+		testStatsCleaner.start();
+		waitForThreadToSleep(testStatsCleaner, 250);
+
+		int hdfsCount = jdbc.queryForInt("select count(id) from hdfs_stats");
+		int queryCount = jdbc.queryForInt("select count(id) from blur_queries");
+		assertEquals(0, hdfsCount);
+		assertEquals(1, queryCount);
+	}
+
+	@Test
+	public void shouldOnlyCleanQueries() {
+		List<String> activeCollectors = new ArrayList<String>();
+		activeCollectors.add("queries");
+
+		makeOldData();
+
+		Thread testStatsCleaner = new Thread(new AgentCleaners(activeCollectors, database), "Test Agent Thread");
+		testStatsCleaner.start();
+		waitForThreadToSleep(testStatsCleaner, 250);
+
+		int hdfsCount = jdbc.queryForInt("select count(id) from hdfs_stats");
+		int queryCount = jdbc.queryForInt("select count(id) from blur_queries");
+		assertEquals(1, hdfsCount);
+		assertEquals(0, queryCount);
+	}
+
+	private void makeOldData() {
+		Calendar overTwoWeeksAgo = TimeHelper.getTimeAgo(16 * 24 * 60 * 60 * 1000);
+		jdbc.update("insert into hdfs_stats (created_at) values (?)", overTwoWeeksAgo);
+		jdbc.update("insert into blur_queries (state, updated_at, created_at) values (?,?,?)", 0, overTwoWeeksAgo, overTwoWeeksAgo);
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/1485db70/src/contrib/blur-console/blur-agent/src/test/java/org/apache/blur/agent/cleaners/HdfsStatsCleanerTest.java
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-agent/src/test/java/org/apache/blur/agent/cleaners/HdfsStatsCleanerTest.java b/src/contrib/blur-console/blur-agent/src/test/java/org/apache/blur/agent/cleaners/HdfsStatsCleanerTest.java
new file mode 100644
index 0000000..7f077af
--- /dev/null
+++ b/src/contrib/blur-console/blur-agent/src/test/java/org/apache/blur/agent/cleaners/HdfsStatsCleanerTest.java
@@ -0,0 +1,52 @@
+package org.apache.blur.agent.cleaners;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+
+import java.util.Calendar;
+
+import org.apache.blur.agent.cleaners.HdfsStatsCleaner;
+import org.apache.blur.agent.connections.cleaners.CleanerDatabaseConnection;
+import org.apache.blur.agent.connections.cleaners.interfaces.CleanerDatabaseInterface;
+import org.apache.blur.agent.test.AgentBaseTestClass;
+import org.apache.blur.agent.types.TimeHelper;
+import org.junit.Test;
+
+
+public class HdfsStatsCleanerTest extends AgentBaseTestClass {
+	private static CleanerDatabaseInterface database = new CleanerDatabaseConnection(jdbc);
+
+	@Test
+	public void shouldDeleteOldStats() {
+		Calendar overTwoWeeksAgo = TimeHelper.getTimeAgo(16 * 24 * 60 * 60 * 1000);
+		jdbc.update("insert into hdfs_stats (created_at) values (?)", overTwoWeeksAgo);
+
+		Thread testStatsCleaner = new Thread(new HdfsStatsCleaner(database), "Hdfs Stats Cleaner Test Thread");
+		testStatsCleaner.start();
+		try {
+			testStatsCleaner.join();
+		} catch (InterruptedException e) {
+			fail("The test QueriesCleaner failed while waiting for it to finish!");
+		}
+
+		int updatedCount = jdbc.queryForInt("select count(id) from hdfs_stats");
+		assertEquals(0, updatedCount);
+	}
+	
+	@Test
+	public void shouldNotDeleteYoungStats() {
+		Calendar underTwoWeeksAgo = TimeHelper.getTimeAgo(8 * 24 * 60 * 60 * 1000);
+		jdbc.update("insert into hdfs_stats (created_at) values (?)", underTwoWeeksAgo);
+
+		Thread testStatsCleaner = new Thread(new HdfsStatsCleaner(database), "Hdfs Stats Cleaner Test Thread");
+		testStatsCleaner.start();
+		try {
+			testStatsCleaner.join();
+		} catch (InterruptedException e) {
+			fail("The test QueriesCleaner failed while waiting for it to finish!");
+		}
+
+		int updatedCount = jdbc.queryForInt("select count(id) from hdfs_stats");
+		assertEquals(1, updatedCount);
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/1485db70/src/contrib/blur-console/blur-agent/src/test/java/org/apache/blur/agent/cleaners/QueryCleanerTest.java
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-agent/src/test/java/org/apache/blur/agent/cleaners/QueryCleanerTest.java b/src/contrib/blur-console/blur-agent/src/test/java/org/apache/blur/agent/cleaners/QueryCleanerTest.java
new file mode 100644
index 0000000..6e10656
--- /dev/null
+++ b/src/contrib/blur-console/blur-agent/src/test/java/org/apache/blur/agent/cleaners/QueryCleanerTest.java
@@ -0,0 +1,105 @@
+package org.apache.blur.agent.cleaners;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+
+import java.util.Calendar;
+
+import org.apache.blur.agent.cleaners.QueriesCleaner;
+import org.apache.blur.agent.connections.cleaners.CleanerDatabaseConnection;
+import org.apache.blur.agent.connections.cleaners.interfaces.CleanerDatabaseInterface;
+import org.apache.blur.agent.test.AgentBaseTestClass;
+import org.apache.blur.agent.types.TimeHelper;
+import org.junit.Test;
+
+
+public class QueryCleanerTest extends AgentBaseTestClass {
+	private static CleanerDatabaseInterface database = new CleanerDatabaseConnection(jdbc);
+
+	@Test
+	public void shouldExpireOldRunningQueries() {
+		Calendar timeOfQuery = TimeHelper.getTimeAgo(3 * 60 * 1000);
+		jdbc.update("insert into blur_queries (state, updated_at, created_at) values (?,?,?)", 0, timeOfQuery, timeOfQuery);
+
+		Thread testQueryCleaner = new Thread(new QueriesCleaner(database), "Query Test Thread");
+		testQueryCleaner.start();
+		try {
+			testQueryCleaner.join();
+		} catch (InterruptedException e) {
+			fail("The test QueriesCleaner failed while waiting for it to finish!");
+		}
+
+		int state = jdbc.queryForInt("select state from blur_queries limit 0, 1");
+		assertEquals(1, state);
+	}
+	
+	@Test
+	public void shouldNotExpireNewlyRunningQueries() {		
+		Calendar timeOfQuery = TimeHelper.getTimeAgo(1 * 60 * 1000);
+		jdbc.update("insert into blur_queries (state, updated_at, created_at) values (?,?,?)", 0, timeOfQuery, timeOfQuery);
+
+		Thread testQueryCleaner = new Thread(new QueriesCleaner(database), "Query Test Thread");
+		testQueryCleaner.start();
+		try {
+			testQueryCleaner.join();
+		} catch (InterruptedException e) {
+			fail("The test QueriesCleaner failed while waiting for it to finish!");
+		}
+
+		int state = jdbc.queryForInt("select state from blur_queries limit 0, 1");
+		assertEquals(0, state);
+	}
+	
+	@Test
+	public void shouldNotExpireExpiredRunningQueries() {		
+		Calendar timeOfQuery = TimeHelper.getTimeAgo(1 * 60 * 1000);
+		// a more recent time, for testing to see if a query is updated after it is created
+		Calendar timeOfUpdate = TimeHelper.getTimeAgo(1 * 30 * 1000);
+		jdbc.update("insert into blur_queries (state, updated_at, created_at) values (?,?,?)", 1, timeOfQuery, timeOfQuery);
+
+		Thread testQueryCleaner = new Thread(new QueriesCleaner(database), "Query Test Thread");
+		testQueryCleaner.start();
+		try {
+			testQueryCleaner.join();
+		} catch (InterruptedException e) {
+			fail("The test QueriesCleaner failed while waiting for it to finish!");
+		}
+
+		int updatedCount = jdbc.queryForInt("select count(id) from blur_queries where updated_at > ?", timeOfUpdate);
+		assertEquals(0, updatedCount);
+	}
+	
+	@Test
+	public void shouldDeleteOldQueries() {		
+		Calendar timeOfQuery = TimeHelper.getTimeAgo(3 * 60 * 60 * 1000);
+		jdbc.update("insert into blur_queries (state, updated_at, created_at) values (?,?,?)", 1, timeOfQuery, timeOfQuery);
+
+		Thread testQueryCleaner = new Thread(new QueriesCleaner(database), "Query Test Thread");
+		testQueryCleaner.start();
+		try {
+			testQueryCleaner.join();
+		} catch (InterruptedException e) {
+			fail("The test QueriesCleaner failed while waiting for it to finish!");
+		}
+
+		int updatedCount = jdbc.queryForInt("select count(id) from blur_queries");
+		assertEquals(0, updatedCount);
+	}
+	
+	@Test
+	public void shouldNotDeleteYoungQueries() {		
+		Calendar timeOfQuery = TimeHelper.getTimeAgo(1 * 60 * 60 * 1000);
+		jdbc.update("insert into blur_queries (state, updated_at, created_at) values (?,?,?)", 1, timeOfQuery, timeOfQuery);
+
+		Thread testQueryCleaner = new Thread(new QueriesCleaner(database), "Query Test Thread");
+		testQueryCleaner.start();
+		try {
+			testQueryCleaner.join();
+		} catch (InterruptedException e) {
+			fail("The test QueriesCleaner failed while waiting for it to finish!");
+		}
+
+		int updatedCount = jdbc.queryForInt("select count(id) from blur_queries");
+		assertEquals(1, updatedCount);
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/1485db70/src/contrib/blur-console/blur-agent/src/test/java/org/apache/blur/agent/collectors/blur/query/QueryCollectorTest.java
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-agent/src/test/java/org/apache/blur/agent/collectors/blur/query/QueryCollectorTest.java b/src/contrib/blur-console/blur-agent/src/test/java/org/apache/blur/agent/collectors/blur/query/QueryCollectorTest.java
new file mode 100644
index 0000000..1ba4724
--- /dev/null
+++ b/src/contrib/blur-console/blur-agent/src/test/java/org/apache/blur/agent/collectors/blur/query/QueryCollectorTest.java
@@ -0,0 +1,54 @@
+package org.apache.blur.agent.collectors.blur.query;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+
+import java.io.IOException;
+
+import org.apache.blur.MiniCluster;
+import org.apache.blur.agent.collectors.blur.query.QueryCollector;
+import org.apache.blur.agent.connections.blur.BlurDatabaseConnection;
+import org.apache.blur.agent.test.BlurAgentBaseTestClass;
+import org.apache.blur.thrift.BlurClient;
+import org.apache.blur.thrift.generated.AnalyzerDefinition;
+import org.apache.blur.thrift.generated.Blur.Iface;
+import org.apache.blur.thrift.generated.BlurException;
+import org.apache.blur.thrift.generated.BlurQuery;
+import org.apache.blur.thrift.generated.ScoreType;
+import org.apache.blur.thrift.generated.SimpleQuery;
+import org.apache.blur.thrift.generated.TableDescriptor;
+import org.apache.thrift.TException;
+import org.junit.Test;
+
+
+public class QueryCollectorTest extends BlurAgentBaseTestClass {
+	private static BlurDatabaseConnection database = new BlurDatabaseConnection(jdbc);
+
+	@Test
+	public void shouldAddQueriesToDB() throws BlurException, TException, IOException {
+		Iface blurConnection = BlurClient.getClient(MiniCluster.getControllerConnectionStr());
+
+
+		TableDescriptor td = new TableDescriptor(); 
+		td.setTableUri(MiniCluster.getFileSystemUri() + "/blur-tables/test-table");
+		td.setAnalyzerDefinition(new AnalyzerDefinition());
+		td.setName("test");
+
+		blurConnection.createTable(td);
+		
+		BlurQuery query = new BlurQuery();
+		query.setSimpleQuery(new SimpleQuery("test.col:*", true, ScoreType.SUPER, null, null));
+		blurConnection.query("test", query);
+		
+		Thread testQueryCollector = new Thread(new QueryCollector(BlurClient.getClient(MiniCluster.getControllerConnectionStr()), "test",
+				1, database), "Query Test Thread");
+		testQueryCollector.start();
+		try {
+			testQueryCollector.join();
+		} catch (InterruptedException e) {
+			fail("The test QueryCollector failed while waiting for it to finish!");
+		}
+		int query_count = jdbc.queryForInt("select count(id) from blur_queries");
+		assertEquals(1, query_count);
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/1485db70/src/contrib/blur-console/blur-agent/src/test/java/org/apache/blur/agent/collectors/hdfs/HdfsCollectorTest.java
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-agent/src/test/java/org/apache/blur/agent/collectors/hdfs/HdfsCollectorTest.java b/src/contrib/blur-console/blur-agent/src/test/java/org/apache/blur/agent/collectors/hdfs/HdfsCollectorTest.java
new file mode 100644
index 0000000..e3e732d
--- /dev/null
+++ b/src/contrib/blur-console/blur-agent/src/test/java/org/apache/blur/agent/collectors/hdfs/HdfsCollectorTest.java
@@ -0,0 +1,68 @@
+package org.apache.blur.agent.collectors.hdfs;
+
+import static org.junit.Assert.assertEquals;
+
+import java.io.IOException;
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.blur.MiniCluster;
+import org.apache.blur.agent.collectors.hdfs.HdfsCollector;
+import org.apache.blur.agent.connections.hdfs.HdfsDatabaseConnection;
+import org.apache.blur.agent.connections.hdfs.interfaces.HdfsDatabaseInterface;
+import org.apache.blur.agent.exceptions.HdfsThreadException;
+import org.apache.blur.agent.test.BlurAgentBaseTestClass;
+import org.junit.Before;
+import org.junit.Test;
+
+
+public class HdfsCollectorTest extends BlurAgentBaseTestClass {
+	private static HdfsDatabaseInterface database = new HdfsDatabaseConnection(jdbc);
+	private static URI hdfsUri;
+
+	@Before
+	public void setup() throws IOException {
+		hdfsUri = MiniCluster.getFileSystemUri();
+	}
+
+	@Test
+	public void shouldCreateHdfs() throws HdfsThreadException {
+		List<String> activeCollectors = new ArrayList<String>();
+
+		Thread testHdfsCollector = new Thread(new HdfsCollector("TestHDFS", hdfsUri.toString(), "hdfs://localhost:55314", null,
+				activeCollectors, database), "Hdfs Test Thread");
+		testHdfsCollector.start();
+		waitForThreadToSleep(testHdfsCollector, 250);
+
+		int hdfsCount = jdbc.queryForInt("select count(id) from hdfs");
+		assertEquals(1, hdfsCount);
+	}
+
+	@Test
+	public void shouldCollectStatsWhenActive() throws HdfsThreadException {
+		List<String> activeCollectors = new ArrayList<String>();
+		activeCollectors.add("hdfs");
+
+		Thread testHdfsCollector = new Thread(new HdfsCollector("TestHDFS", hdfsUri.toString(), "hdfs://localhost:55314", null,
+				activeCollectors, database), "Hdfs Test Thread");
+		testHdfsCollector.start();
+		waitForThreadToSleep(testHdfsCollector, 250);
+
+		int statsCount = jdbc.queryForInt("select count(id) from hdfs_stats");
+		assertEquals(1, statsCount);
+	}
+
+	@Test
+	public void shouldNotCollectStatsWithoutActive() throws HdfsThreadException {
+		List<String> activeCollectors = new ArrayList<String>();
+
+		Thread testHdfsCollector = new Thread(new HdfsCollector("TestHDFS", hdfsUri.toString(), "hdfs://localhost:55314", null,
+				activeCollectors, database), "Hdfs Test Thread");
+		testHdfsCollector.start();
+		waitForThreadToSleep(testHdfsCollector, 250);
+
+		int statsCount = jdbc.queryForInt("select count(id) from hdfs_stats");
+		assertEquals(0, statsCount);
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/1485db70/src/contrib/blur-console/blur-agent/src/test/java/org/apache/blur/agent/collectors/hdfs/HdfsStatCollectorTest.java
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-agent/src/test/java/org/apache/blur/agent/collectors/hdfs/HdfsStatCollectorTest.java b/src/contrib/blur-console/blur-agent/src/test/java/org/apache/blur/agent/collectors/hdfs/HdfsStatCollectorTest.java
new file mode 100644
index 0000000..1adb53f
--- /dev/null
+++ b/src/contrib/blur-console/blur-agent/src/test/java/org/apache/blur/agent/collectors/hdfs/HdfsStatCollectorTest.java
@@ -0,0 +1,54 @@
+package org.apache.blur.agent.collectors.hdfs;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+
+import java.io.IOException;
+import java.net.URI;
+
+import org.apache.blur.MiniCluster;
+import org.apache.blur.agent.connections.hdfs.HdfsDatabaseConnection;
+import org.apache.blur.agent.connections.hdfs.interfaces.HdfsDatabaseInterface;
+import org.apache.blur.agent.test.BlurAgentBaseTestClass;
+import org.junit.Before;
+import org.junit.Test;
+
+
+public class HdfsStatCollectorTest extends BlurAgentBaseTestClass {
+	private static HdfsDatabaseInterface database = new HdfsDatabaseConnection(jdbc);
+	private static URI hdfsUri;
+
+	@Before
+	public void setup() throws IOException {
+		hdfsUri = MiniCluster.getFileSystemUri();
+	}
+
+	@Test
+	public void shouldNotInsertStatsWithoutParent() {
+		Thread testHdfsStatsCollector = new Thread(new HdfsStatsCollector("Test HDFS", hdfsUri, null, database), "HdfsStat Test Thread");
+		testHdfsStatsCollector.start();
+		try {
+			testHdfsStatsCollector.join();
+		} catch (InterruptedException e) {
+			fail("The test HdfsStatCollector failed while waiting for it to finish!");
+		}
+
+		int statsCount = jdbc.queryForInt("select count(id) from hdfs_stats");
+		assertEquals(0, statsCount);
+	}
+	
+	@Test
+	public void shouldInsertStats() {
+		jdbc.update("insert into hdfs (name) values (?)", "TestHdfs");
+		Thread testHdfsStatsCollector = new Thread(new HdfsStatsCollector("TestHdfs", hdfsUri, null, database), "HdfsStat Test Thread");
+		testHdfsStatsCollector.start();
+		try {
+			testHdfsStatsCollector.join();
+		} catch (InterruptedException e) {
+			fail("The test HdfsStatCollector failed while waiting for it to finish!");
+		}
+
+		int statsCount = jdbc.queryForInt("select count(id) from hdfs_stats");
+		assertEquals(1, statsCount);
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/1485db70/src/contrib/blur-console/blur-agent/src/test/java/org/apache/blur/agent/notifications/MailerTest.java
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-agent/src/test/java/org/apache/blur/agent/notifications/MailerTest.java b/src/contrib/blur-console/blur-agent/src/test/java/org/apache/blur/agent/notifications/MailerTest.java
new file mode 100644
index 0000000..8ad8c7a
--- /dev/null
+++ b/src/contrib/blur-console/blur-agent/src/test/java/org/apache/blur/agent/notifications/MailerTest.java
@@ -0,0 +1,259 @@
+package org.apache.blur.agent.notifications;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.lang.reflect.Field;
+import java.util.Collection;
+import java.util.Properties;
+
+import javax.mail.MessagingException;
+
+import org.apache.blur.agent.notifications.Mailer;
+import org.junit.Test;
+import org.springframework.util.ReflectionUtils;
+import org.subethamail.wiser.Wiser;
+
+
+public class MailerTest {
+
+	@Test
+	public void testSingletons() {
+		// getter no props
+		Mailer mailer = new Mailer(new Properties());
+		assertFieldEquals("Send mail should be false", mailer, "sendMail", false);
+		assertFieldEquals("Recipients shouldn't have been set because sendMail is false.", mailer, "recipients", null);
+		assertFieldEquals("Sender should be null", mailer, "automatedSender", null);
+
+		// getter with props
+		Properties props = new Properties();
+		props.setProperty("mail.enabled", "true");
+		props.setProperty("mail.host", "localhost");
+		props.setProperty("mail.port", "25");
+		props.setProperty("mail.sender.username", "crohr");
+		props.setProperty("mail.from.address", "crohr");
+		props.setProperty("mail.sender.password", "password");
+		props.setProperty("mail.recipients", "crohr@nearinfinity.com|bmarcur@nearinfinity.com");
+		mailer = new Mailer(props);
+		assertFieldEquals("Send mail should be true", mailer, "sendMail", true);
+		assertCollectionFieldEquals("There should be 2 valid recipients", mailer, "recipients", 2);
+		assertFieldEquals("Sender should be crohr", mailer, "automatedSender", "crohr");
+	}
+
+	@Test
+	public void testMailerSetupInvalidAddress() {
+		Properties props = new Properties();
+		props.setProperty("mail.enabled", "true");
+		props.setProperty("mail.host", "localhost");
+		props.setProperty("mail.port", "25");
+		props.setProperty("mail.sender.username", "crohr");
+		props.setProperty("mail.from.address", "crohr");
+		props.setProperty("mail.sender.password", "password");
+		props.setProperty("mail.recipients", "test@nearinfinity com");
+		Mailer mailer = new Mailer(props);
+
+		assertCollectionFieldEquals("There should be no valid recipients", mailer, "recipients", 0);
+		assertFieldEquals("Sender should be crohr", mailer, "automatedSender", "crohr");
+	}
+
+	@Test
+	public void testMailerSetupWithUniqueDomain() {
+		Properties props = new Properties();
+		props.setProperty("mail.enabled", "true");
+		props.setProperty("mail.host", "localhost");
+		props.setProperty("mail.port", "25");
+		props.setProperty("mail.sender.username", "crohr");
+		props.setProperty("mail.from.address", "crohr");
+		props.setProperty("mail.sender.password", "password");
+		props.setProperty("mail.recipients", "crohr@abc");
+		Mailer mailer = new Mailer(props);
+
+		assertCollectionFieldEquals("There should be 1 valid recipient", mailer, "recipients", 1);
+		assertFieldEquals("Sender should be crohr", mailer, "automatedSender", "crohr");
+	}
+	
+	@Test
+	public void testSendMessageMailerDisabled() {
+		Wiser server = new Wiser(2500);
+		server.start();
+		
+		Properties props = new Properties();
+		props.setProperty("mail.enabled", "false");
+		Mailer mailer = new Mailer(props);
+		mailer.sendMessage("Test Message Subject", "Test Message Body");
+		
+		server.stop();
+		assertTrue(server.getMessages().size() == 0);
+	}
+	
+	@Test
+	public void testSendMessageNoRecipients() {
+		Wiser server = new Wiser(2500);
+		server.start();
+		
+		Properties props = new Properties();
+		props.setProperty("mail.enabled", "true");
+		props.setProperty("mail.host", "localhost");
+		props.setProperty("mail.port", "25");
+		props.setProperty("mail.sender.username", "crohr");
+		props.setProperty("mail.from.address", "crohr");
+		props.setProperty("mail.sender.password", "password");
+		Mailer mailer = new Mailer(props);
+		mailer.sendMessage("Test Message Subject", "Test Message Body");
+		
+		server.stop();
+		assertTrue(server.getMessages().size() == 0);
+	}
+	
+	@Test
+	public void testSendMessage() throws MessagingException {
+		Wiser server = new Wiser(2500);
+		server.start();
+		
+		Properties props = new Properties();
+		props.setProperty("mail.enabled", "true");
+		props.setProperty("mail.host", "localhost");
+		props.setProperty("mail.port", "2500");
+		props.setProperty("mail.sender.username", "crohr");
+		props.setProperty("mail.from.address", "crohr");
+		props.setProperty("mail.sender.password", "password");
+		props.setProperty("mail.recipients", "crohr@nearinfinity.com|bmarcur@nearinfinity.com");
+		Mailer mailer = new Mailer(props);
+		mailer.sendMessage("Test Message Subject", "Test Message Body");
+		
+		server.stop();
+		assertTrue(server.getMessages().size() == 2);
+		assertEquals("Test Message Subject", server.getMessages().get(0).getMimeMessage().getSubject());
+	}
+
+//	@Test
+//	public void testSendZookeeperNotice() throws MessagingException, IOException {
+//		Wiser server = new Wiser(2500);
+//		server.start();
+//
+//		setupActiveMailer("crohr@nearinfinity.com").notifyZookeeperOffline("ZK1");
+//
+//		server.stop();
+//
+//		assertProperMessageSent("Zookeeper", "ZK1", server);
+//	}
+//	
+//	@Test
+//	public void testSendControllersNoticeSingleNode() throws MessagingException, IOException {
+//		Wiser server = new Wiser(2500);
+//		server.start();
+//
+//		List<String> names = new ArrayList<String>();
+//		names.add("C1");
+//		
+//		setupActiveMailer("crohr@nearinfinity.com").notifyControllerOffline(names);
+//
+//		server.stop();
+//
+//		assertProperMessageSent("Controllers", "C1", server);
+//	}
+//	
+//	@Test
+//	public void testSendControllersNoticeMultiNode() throws MessagingException, IOException {
+//		Wiser server = new Wiser(2500);
+//		server.start();
+//
+//		List<String> names = new ArrayList<String>();
+//		names.add("C1");
+//		names.add("C2");
+//		
+//		setupActiveMailer("crohr@nearinfinity.com").notifyControllerOffline(names);
+//
+//		server.stop();
+//
+//		assertProperMultiMessageSent("Controllers", names, server);
+//	}
+//	
+//	@Test
+//	public void testSendShardsNoticeSingleNode() throws MessagingException, IOException {
+//		Wiser server = new Wiser(2500);
+//		server.start();
+//
+//		List<String> names = new ArrayList<String>();
+//		names.add("S1");
+//		
+//		setupActiveMailer("crohr@nearinfinity.com").notifyShardOffline(names);
+//
+//		server.stop();
+//
+//		assertProperMessageSent("Shards", "S1", server);
+//	}
+//	
+//	@Test
+//	public void testSendShardsNoticeMultiNode() throws MessagingException, IOException {
+//		Wiser server = new Wiser(2500);
+//		server.start();
+//
+//		List<String> names = new ArrayList<String>();
+//		names.add("S1");
+//		names.add("S2");
+//		
+//		setupActiveMailer("crohr@nearinfinity.com").notifyShardOffline(names);
+//
+//		server.stop();
+//
+//		assertProperMultiMessageSent("Shards", names, server);
+//	}
+//
+//	@Test
+//	public void testNoMessageSentWithNoRecipients() {
+//		Wiser server = new Wiser(2500);
+//		server.start();
+//
+//		List<String> names = new ArrayList<String>();
+//		names.add("S1");
+//		setupActiveMailer("").notifyShardOffline(names);
+//
+//		server.stop();
+//
+//		assertTrue(server.getMessages().size() == 0);
+//	}
+
+//	private Mailer setupActiveMailer(String recipients) {
+//		Properties props = new Properties();
+//		props.setProperty("mail.host", "localhost");
+//		props.setProperty("mail.port", "2500");
+//		props.setProperty("mail.sender.username", "crohr");
+//		props.setProperty("mail.sender.password", "password");
+//		props.setProperty("mail.recipients", recipients);
+//		return new Mailer(props);
+//	}
+//
+//	private void assertProperMessageSent(String type, String name, Wiser server) throws MessagingException, IOException {
+//		assertTrue(server.getMessages().size() == 1);
+//		Iterator<WiserMessage> emailIter = server.getMessages().iterator();
+//		WiserMessage email = (WiserMessage) emailIter.next();
+//		assertTrue(email.getMimeMessage().getSubject().equals("Blur Console: " + type + " [" + name + "] may have gone offline!"));
+//		assertEquals("Blur Console has received notice that " + type + " [" + name
+//				+ "] has recently gone offline, if this was expected please ignore this email.",
+//				StringUtils.trim((String) email.getMimeMessage().getContent()));
+//	}
+//	
+//	private void assertProperMultiMessageSent(String type, List<String> names, Wiser server) throws MessagingException, IOException {
+//		assertTrue(server.getMessages().size() == 1);
+//		Iterator<WiserMessage> emailIter = server.getMessages().iterator();
+//		WiserMessage email = (WiserMessage) emailIter.next();
+//		assertTrue(email.getMimeMessage().getSubject().equals("Blur Console: Multiple " + type + " may have gone offline!"));
+//		assertEquals("Blur Console has received notice that " + type + " [" + StringUtils.join(names, "','")
+//				+ "] have recently gone offline, if this was expected please ignore this email.",
+//				StringUtils.trim((String) email.getMimeMessage().getContent()));
+//	}
+
+	private void assertFieldEquals(String message, Object object, String fieldName, Object value) {
+		Field field = ReflectionUtils.findField(object.getClass(), fieldName);
+		ReflectionUtils.makeAccessible(field);
+		assertEquals(message, value, ReflectionUtils.getField(field, object));
+	}
+
+	@SuppressWarnings("unchecked")
+	private void assertCollectionFieldEquals(String message, Object object, String fieldName, int expectedCollectionSize) {
+		Field field = ReflectionUtils.findField(object.getClass(), fieldName);
+		ReflectionUtils.makeAccessible(field);
+		assertEquals(message, expectedCollectionSize, ((Collection<Object>) ReflectionUtils.getField(field, object)).size());
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/1485db70/src/contrib/blur-console/blur-agent/src/test/java/org/apache/blur/agent/notifications/MessengerTest.java
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-agent/src/test/java/org/apache/blur/agent/notifications/MessengerTest.java b/src/contrib/blur-console/blur-agent/src/test/java/org/apache/blur/agent/notifications/MessengerTest.java
new file mode 100644
index 0000000..4e0fd1c
--- /dev/null
+++ b/src/contrib/blur-console/blur-agent/src/test/java/org/apache/blur/agent/notifications/MessengerTest.java
@@ -0,0 +1,102 @@
+package org.apache.blur.agent.notifications;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.lang.reflect.Field;
+import java.util.Collection;
+import java.util.Properties;
+
+import javax.mail.MessagingException;
+
+import org.apache.blur.agent.notifications.Messenger;
+import org.junit.Test;
+import org.springframework.util.ReflectionUtils;
+
+
+public class MessengerTest {
+
+	@Test
+	public void testSingletons() {
+		// getter no props
+		Messenger mailer = new Messenger(new Properties());
+		assertFieldEquals("Send message should be false", mailer, "sendMessage", false);
+		assertFieldEquals("Recipients shouldn't have been set because sendMessage is false.", mailer, "recipients", null);
+
+		// getter with props
+		Properties props = new Properties();
+		props.setProperty("messenger.enabled", "true");
+		props.setProperty("messenger.host", "localhost");
+		props.setProperty("messenger.port", "25");
+		props.setProperty("messenger.user", "crohr");
+		props.setProperty("messenger.password", "password");
+		props.setProperty("messenger.recipients", "crohr@nearinfinity.com|bmarcur@nearinfinity.com");
+		mailer = new Messenger(props);
+		assertFieldEquals("Send messenger should be true", mailer, "sendMessage", true);
+		assertCollectionFieldEquals("There should be 2 valid recipients", mailer, "recipients", 2);
+	}
+
+	
+	@Test
+	public void testSendMessageMessengerDisabled() {
+		XMPPEmbeddedServer.startServer(2500);
+		
+		Properties props = new Properties();
+		props.setProperty("messenger.enabled", "false");
+		Messenger mailer = new Messenger(props);
+		mailer.sendMessage("Test Message");
+		
+		XMPPEmbeddedServer.stopServer();
+		assertTrue(XMPPEmbeddedServer.getMessages().size() == 0);
+	}
+	
+	@Test
+	public void testSendMessageNoRecipients() {
+		XMPPEmbeddedServer.startServer(2500);
+		
+		Properties props = new Properties();
+		props.setProperty("messenger.enabled", "true");
+		props.setProperty("messenger.host", "localhost");
+		props.setProperty("messenger.port", "2500");
+		props.setProperty("messenger.user", "crohr");
+		props.setProperty("messenger.password", "password");
+		Messenger mailer = new Messenger(props);
+		mailer.sendMessage("Test Message");
+		
+		XMPPEmbeddedServer.stopServer();
+		assertTrue(XMPPEmbeddedServer.getMessages().size() == 0);
+	}
+	
+	@Test
+	public void testSendMessage() throws MessagingException {
+		XMPPEmbeddedServer.startServer(2500);
+		
+		Properties props = new Properties();
+		props.setProperty("messenger.enabled", "true");
+		props.setProperty("messenger.host", "localhost");
+		props.setProperty("messenger.port", "2500");
+		props.setProperty("messenger.user", "crohr");
+		props.setProperty("messenger.password", "password");
+		props.setProperty("messenger.recipients", "crohr@nearinfinity.com|bmarcur@nearinfinity.com");
+		Messenger mailer = new Messenger(props);
+		mailer.sendMessage("Test Message");
+		
+		XMPPEmbeddedServer.stopServer();
+		assertTrue(XMPPEmbeddedServer.getMessages().size() == 0);
+		//assertEquals("Test Message", XMPPEmbeddedServer.getMessages().get(0));
+	}
+	
+	private void assertFieldEquals(String message, Object object, String fieldName, Object value) {
+		Field field = ReflectionUtils.findField(object.getClass(), fieldName);
+		ReflectionUtils.makeAccessible(field);
+		assertEquals(message, value, ReflectionUtils.getField(field, object));
+	}
+
+	@SuppressWarnings("unchecked")
+	private void assertCollectionFieldEquals(String message, Object object, String fieldName, int expectedCollectionSize) {
+		Field field = ReflectionUtils.findField(object.getClass(), fieldName);
+		ReflectionUtils.makeAccessible(field);
+		assertEquals(message, expectedCollectionSize, ((Collection<Object>) ReflectionUtils.getField(field, object)).size());
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/1485db70/src/contrib/blur-console/blur-agent/src/test/java/org/apache/blur/agent/notifications/NotifierTest.java
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-agent/src/test/java/org/apache/blur/agent/notifications/NotifierTest.java b/src/contrib/blur-console/blur-agent/src/test/java/org/apache/blur/agent/notifications/NotifierTest.java
new file mode 100644
index 0000000..122a538
--- /dev/null
+++ b/src/contrib/blur-console/blur-agent/src/test/java/org/apache/blur/agent/notifications/NotifierTest.java
@@ -0,0 +1,5 @@
+package org.apache.blur.agent.notifications;
+
+public class NotifierTest {
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/1485db70/src/contrib/blur-console/blur-agent/src/test/java/org/apache/blur/agent/notifications/XMPPEmbeddedServer.java
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-agent/src/test/java/org/apache/blur/agent/notifications/XMPPEmbeddedServer.java b/src/contrib/blur-console/blur-agent/src/test/java/org/apache/blur/agent/notifications/XMPPEmbeddedServer.java
new file mode 100644
index 0000000..b65d2cb
--- /dev/null
+++ b/src/contrib/blur-console/blur-agent/src/test/java/org/apache/blur/agent/notifications/XMPPEmbeddedServer.java
@@ -0,0 +1,95 @@
+package org.apache.blur.agent.notifications;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.PrintWriter;
+import java.net.ServerSocket;
+import java.net.Socket;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+public class XMPPEmbeddedServer implements Runnable {
+	private static final Log log = LogFactory.getLog(XMPPEmbeddedServer.class);
+	private static Thread serverThread;
+	private static XMPPEmbeddedServer server;
+	private ServerSocket socket;
+	
+	public static void startServer(int port) {
+		server = new XMPPEmbeddedServer(port);
+		serverThread = new Thread(server);
+		serverThread.start();
+	}
+	
+	public static void stopServer() {
+		server.closeServer();
+		serverThread.interrupt();
+	}
+	
+	public static List<Object> getMessages() {
+		return new ArrayList<Object>();
+	}
+	
+	private XMPPEmbeddedServer(int port) {
+		try {
+			log.info("Starting IM Server *:" + port);
+			socket = new ServerSocket(port);
+			log.info("IM Server started *:" + port);
+		} catch (IOException e) {
+			log.error("Error creating IM server:" + e.getMessage());
+			stopServer();
+		}
+	}
+
+	@Override
+	public void run() {
+		if (socket == null) {
+			log.info("IM Server has not been configured.");
+		} else {
+			while(true) {
+				if (socket != null) {
+					try {
+						Socket accept = socket.accept();
+						System.out.println("got a connection");
+						
+						PrintWriter out = new PrintWriter(accept.getOutputStream(), true);
+						out.println("<stream id='xxxx' from='192.168.0.12:5222' xmlns='jabber:client'/>");
+						
+						BufferedReader in = new BufferedReader(new InputStreamReader(accept.getInputStream()));
+						
+						String inputLine;
+						while ((inputLine = in.readLine()) != null) { 
+							System.out.println(inputLine);
+						}
+						
+//						out = new PrintWriter(accept.getOutputStream(), true);
+//						out.println("<iq type='result' id='reg2'/>");
+						
+						
+						
+					} catch (IOException e) {
+//						e.printStackTrace();
+					}
+				}
+			}
+		}
+	}
+	
+	public void closeServer() {
+		if (socket != null) {
+			try {
+				log.info("Shutting down IM server");
+				socket.close();
+				log.info("IM server has been shut down");
+			} catch (IOException e) {
+				log.error("There was a problem trying to close IM server: " + e.getMessage());
+			}
+			socket = null;
+		}
+	}
+	
+	
+}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/1485db70/src/contrib/blur-console/blur-agent/src/test/java/org/apache/blur/agent/test/AgentBaseTestClass.java
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-agent/src/test/java/org/apache/blur/agent/test/AgentBaseTestClass.java b/src/contrib/blur-console/blur-agent/src/test/java/org/apache/blur/agent/test/AgentBaseTestClass.java
new file mode 100644
index 0000000..4c658f6
--- /dev/null
+++ b/src/contrib/blur-console/blur-agent/src/test/java/org/apache/blur/agent/test/AgentBaseTestClass.java
@@ -0,0 +1,46 @@
+package org.apache.blur.agent.test;
+
+import java.util.List;
+import java.util.Properties;
+
+import org.apache.blur.agent.connections.JdbcConnection;
+import org.junit.After;
+import org.junit.BeforeClass;
+import org.springframework.jdbc.core.JdbcTemplate;
+
+
+public abstract class AgentBaseTestClass {
+	protected static JdbcTemplate jdbc;
+
+	@BeforeClass
+	public static void setupDatabaseConnection() {
+		Properties props = new Properties();
+		props.setProperty("store.url", "jdbc:mysql://localhost/blurtools-test");
+		props.setProperty("store.user", "root");
+		props.setProperty("store.password", "");
+		jdbc = JdbcConnection.createDBConnection(props);
+	}
+
+	@After
+	public void tearDownDatabase() {
+		List<String> tables = jdbc.queryForList("select TABLE_NAME from information_schema.tables where table_schema = 'blurtools-test'",
+				String.class);
+
+		for (String table : tables) {
+			if (!"schema_migrations".equalsIgnoreCase(table)) {
+				jdbc.execute("truncate table " + table);
+			}
+		}
+	}
+	
+	protected void waitForThreadToSleep(Thread tiredThread, int catchupTime){
+		while(tiredThread.getState() != Thread.State.TIMED_WAITING){
+			// Wait until the thread goes to sleep
+		}
+		try {
+			Thread.sleep(catchupTime);
+			tiredThread.interrupt();
+		} catch (InterruptedException e) {}
+		return;
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/1485db70/src/contrib/blur-console/blur-agent/src/test/java/org/apache/blur/agent/test/BlurAgentBaseTestClass.java
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-agent/src/test/java/org/apache/blur/agent/test/BlurAgentBaseTestClass.java b/src/contrib/blur-console/blur-agent/src/test/java/org/apache/blur/agent/test/BlurAgentBaseTestClass.java
new file mode 100644
index 0000000..c587edb
--- /dev/null
+++ b/src/contrib/blur-console/blur-agent/src/test/java/org/apache/blur/agent/test/BlurAgentBaseTestClass.java
@@ -0,0 +1,23 @@
+package org.apache.blur.agent.test;
+
+import org.apache.blur.MiniCluster;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+
+public abstract class BlurAgentBaseTestClass extends AgentBaseTestClass {
+	@BeforeClass
+	public static void startBlur() {
+		MiniCluster.startDfs("./tmp");
+		MiniCluster.startZooKeeper("./tmp");
+		MiniCluster.startControllers(1);
+		MiniCluster.startShards(1);
+	}
+
+	@AfterClass
+	public static void stopBlur() {
+		MiniCluster.stopShards();
+		MiniCluster.stopControllers();
+		MiniCluster.shutdownZooKeeper();
+		MiniCluster.shutdownDfs();
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/1485db70/src/contrib/blur-console/blur-agent/src/test/resources/invalid_matching.lic
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-agent/src/test/resources/invalid_matching.lic b/src/contrib/blur-console/blur-agent/src/test/resources/invalid_matching.lic
deleted file mode 100644
index bea4ca7..0000000
--- a/src/contrib/blur-console/blur-agent/src/test/resources/invalid_matching.lic
+++ /dev/null
@@ -1,22 +0,0 @@
-=== BEGIN LICENSE ===
-NIC-Testing-Bad
--1
-YEARLY
-2012-09-11
-2013-09-11
-Blur Tools
-qhGyWf2cmNK4L4pT5hSyi3YxLx/4Olu27nas9DGeoPfsHzx47v
-PeohZ19ho1Oket4YPM9N8bmX7el2r1dLhFxn8xDdASSn6AO2LE
-jYwf57U1GYjLtmRTHMPdw/Y1hZGafHMc9QVk8pc+lTg1eA2aAv
-7sCrc4B+z/HocmeDCRKJOsCSQuXwFW3LtufE2JlCF4i1xTIc3N
-+hn1mdjqpsqEkQfEaeRzjz6l8a5gfxp1h4ny/MZdyAPnrorIJf
-DdLsc9mdKz3Mf82I5h2jZwCQBmSpQbHM1IZEBpEm2B4EA18lpP
-BOO3hzmolbkeHOMWqGjtXvlKMDmh0ZOdhl1esQKyar0esoZn5j
-6lF6nZZOJuugbICQ82vSoOcnhHqJaxgu/GM6ntfctfPcsl9IUe
-FhKi4b3dkkjeodEHmR1tqdoLfEFEp73T8MJReBBu31J+vAeqMW
-OZ427ETuLDN7KiKsbQcRQnnioHsA7Ah7VtBO++loVDEAhmBbyj
-IuyTJmd+dMMLXT6U2M60bsvRfqFqTbd358XZjB9SumrhGFlAKA
-0cCI6UcYyyKgQ+PwPGoCxM+1OjcQ/2nWock0qmWsYBBro0CrPJ
-SPk8QKAkh1V8xBFrUZ8RaosjnE2Z9mzl2a+qugb40Y1+r6h1uX
-U9/GP9buxArj/dkvgHm4m6bV0vtkOgOaw=
-=== END LICENSE ===
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/1485db70/src/contrib/blur-console/blur-agent/src/test/resources/invalid_type.lic
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-agent/src/test/resources/invalid_type.lic b/src/contrib/blur-console/blur-agent/src/test/resources/invalid_type.lic
deleted file mode 100644
index 10a9906..0000000
--- a/src/contrib/blur-console/blur-agent/src/test/resources/invalid_type.lic
+++ /dev/null
@@ -1,22 +0,0 @@
-=== BEGIN LICENSE ===
-NIC-Testing
--1
-UNKNOWN
-2012-09-11
-2013-09-11
-Blur Tools
-qhGyWf2cmNK4L4pT5hSyi3YxLx/4Olu27nas9DGeoPfsHzx47v
-PeohZ19ho1Oket4YPM9N8bmX7el2r1dLhFxn8xDdASSn6AO2LE
-jYwf57U1GYjLtmRTHMPdw/Y1hZGafHMc9QVk8pc+lTg1eA2aAv
-7sCrc4B+z/HocmeDCRKJOsCSQuXwFW3LtufE2JlCF4i1xTIc3N
-+hn1mdjqpsqEkQfEaeRzjz6l8a5gfxp1h4ny/MZdyAPnrorIJf
-DdLsc9mdKz3Mf82I5h2jZwCQBmSpQbHM1IZEBpEm2B4EA18lpP
-BOO3hzmolbkeHOMWqGjtXvlKMDmh0ZOdhl1esQKyar0esoZn5j
-6lF6nZZOJuugbICQ82vSoOcnhHqJaxgu/GM6ntfctfPcsl9IUe
-FhKi4b3dkkjeodEHmR1tqdoLfEFEp73T8MJReBBu31J+vAeqMW
-OZ427ETuLDN7KiKsbQcRQnnioHsA7Ah7VtBO++loVDEAhmBbyj
-IuyTJmd+dMMLXT6U2M60bsvRfqFqTbd358XZjB9SumrhGFlAKA
-0cCI6UcYyyKgQ+PwPGoCxM+1OjcQ/2nWock0qmWsYBBro0CrPJ
-SPk8QKAkh1V8xBFrUZ8RaosjnE2Z9mzl2a+qugb40Y1+r6h1uX
-U9/GP9buxArj/dkvgHm4m6bV0vtkOgOaw=
-=== END LICENSE ===
\ No newline at end of file


Mime
View raw message