diff --git a/src/main/java/org/onap/dmaap/dbcapi/util/DmaapConfig.java b/src/main/java/org/onap/dmaap/dbcapi/util/DmaapConfig.java
index cfcdc1c..a47c0bd 100644
--- a/src/main/java/org/onap/dmaap/dbcapi/util/DmaapConfig.java
+++ b/src/main/java/org/onap/dmaap/dbcapi/util/DmaapConfig.java
@@ -37,10 +37,8 @@
 		return(configfname);
 	}
 	private DmaapConfig() {
-		try {
-			InputStream is = new FileInputStream(configfname);
+		try (InputStream is = new FileInputStream(configfname)){
 			load(is);
-			is.close();
 		} catch (Exception e) {
 			System.err.println("Unable to load configuration file " + configfname);
 			org.apache.log4j.Logger.getLogger(getClass()).fatal("Unable to load configuration file " + configfname, e);
diff --git a/src/main/java/org/onap/dmaap/dbcapi/util/DmaapTimestamp.java b/src/main/java/org/onap/dmaap/dbcapi/util/DmaapTimestamp.java
index 776a4b4..f36df1c 100644
--- a/src/main/java/org/onap/dmaap/dbcapi/util/DmaapTimestamp.java
+++ b/src/main/java/org/onap/dmaap/dbcapi/util/DmaapTimestamp.java
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -20,30 +20,27 @@
 
 package org.onap.dmaap.dbcapi.util;
 
-import java.util.Calendar;
-import java.util.Date;
-
 import javax.xml.bind.annotation.XmlRootElement;
-
-import org.apache.log4j.Logger;
+import java.util.Date;
 
 @XmlRootElement
 public class DmaapTimestamp {
-	static final Logger logger = Logger.getLogger(DmaapTimestamp.class);
-	private Calendar cal = Calendar.getInstance();
-	private Date stamp;
-	
-	public DmaapTimestamp() {
+    private Date stamp;
 
-		stamp = cal.getTime();
-	}
-	
-	public void mark() {
-		stamp =  cal.getTime();
-	}
-	
-	public Date getVal() {
-		return stamp;
-	}
+    public DmaapTimestamp() {
+        this(new Date());
+    }
+
+    DmaapTimestamp(Date stamp) {
+        this.stamp = new Date(stamp.getTime());
+    }
+
+    public void mark() {
+        stamp = new Date();
+    }
+
+    public Date getVal() {
+        return new Date(stamp.getTime());
+    }
 
 }
diff --git a/src/main/java/org/onap/dmaap/dbcapi/util/Graph.java b/src/main/java/org/onap/dmaap/dbcapi/util/Graph.java
index 700c77f..ab40765 100644
--- a/src/main/java/org/onap/dmaap/dbcapi/util/Graph.java
+++ b/src/main/java/org/onap/dmaap/dbcapi/util/Graph.java
@@ -53,19 +53,17 @@
 		if ( clients == null )
 			return;
 		initGraph( clients, strict, "" );
-		return;
 
 	}
 	public Graph( List<MR_Client> clients, boolean strict, String group ) {
 		if ( clients == null )
 			return;
 		initGraph( clients, strict, group );
-		return;
 	}
 	
 	private void initGraph(List<MR_Client> clients, boolean strict, String group ) {
 		MR_ClusterService clusters = new MR_ClusterService();
-		this.graph = new HashMap<String, String>();
+		this.graph = new HashMap<>();
 		this.hasCentral = false;
 		for( MR_Client client: clients ) {
 			if ( ! strict || client.isStatusValid()) {
diff --git a/src/main/java/org/onap/dmaap/dbcapi/util/RandomInteger.java b/src/main/java/org/onap/dmaap/dbcapi/util/RandomInteger.java
index ea8483f..1c9bc11 100644
--- a/src/main/java/org/onap/dmaap/dbcapi/util/RandomInteger.java
+++ b/src/main/java/org/onap/dmaap/dbcapi/util/RandomInteger.java
@@ -25,7 +25,6 @@
 // with some modifications
 import java.util.Random;
 
-
 public final class RandomInteger {
 	private static Random randomGenerator;
 	private int range;
@@ -39,24 +38,6 @@
 	public int next(){
 		return randomGenerator.nextInt(range);
 	}
-  
-/** Generate 10 random integers in the range 0..99. 
-  public static final void main(String... aArgs){
-    log("Generating 10 random integers in range 0..99.");
-    RandomInteger ri = new RandomInteger(100);
-    //note a single Random object is reused here
-    
-    for (int idx = 1; idx <= 10; ++idx){
-      int randomInt = ri.next();
-      log("Generated : " + randomInt);
-    }
-    
-    log("Done.");
-  }
-  
-  private static void log(String aMessage){
-    System.out.println(aMessage);
-  }
-*/
+
 }
  
diff --git a/src/test/java/org/onap/dmaap/dbcapi/util/DmaapTimestampTest.java b/src/test/java/org/onap/dmaap/dbcapi/util/DmaapTimestampTest.java
new file mode 100644
index 0000000..33d1d17
--- /dev/null
+++ b/src/test/java/org/onap/dmaap/dbcapi/util/DmaapTimestampTest.java
@@ -0,0 +1,42 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * org.onap.dmaap
+ * ================================================================================
+ * Copyright (C) 2019 Nokia Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.dmaap.dbcapi.util;
+
+import org.junit.Test;
+
+import java.util.Date;
+
+import static org.junit.Assert.assertTrue;
+
+public class DmaapTimestampTest {
+
+    private DmaapTimestamp dmaapTimestamp = new DmaapTimestamp();
+
+    @Test
+    public void mark_shouldUpdateTimestamp() {
+        dmaapTimestamp = new DmaapTimestamp(new Date(10));
+        Date timestamp = dmaapTimestamp.getVal();
+
+        dmaapTimestamp.mark();
+
+        assertTrue(timestamp.before(dmaapTimestamp.getVal()));
+    }
+}
\ No newline at end of file
diff --git a/src/test/java/org/onap/dmaap/dbcapi/util/RandomIntegerTest.java b/src/test/java/org/onap/dmaap/dbcapi/util/RandomIntegerTest.java
index bd5f9cd..1184cdb 100644
--- a/src/test/java/org/onap/dmaap/dbcapi/util/RandomIntegerTest.java
+++ b/src/test/java/org/onap/dmaap/dbcapi/util/RandomIntegerTest.java
@@ -2,14 +2,14 @@
  * ============LICENSE_START=======================================================
  * org.onap.dmaap
  * ================================================================================
- * Copyright (C) 2018 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2019 Nokia Intellectual Property. All rights reserved.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -19,59 +19,22 @@
  */
 package org.onap.dmaap.dbcapi.util;
 
-import org.onap.dmaap.dbcapi.model.*;
-import org.onap.dmaap.dbcapi.service.*;
-import org.onap.dmaap.dbcapi.testframework.ReflectionHarness;
-
-import static org.junit.Assert.*;
-
-import org.junit.After;
-import org.junit.Before;
 import org.junit.Test;
-import java.util.*;
-import java.sql.*;
+
+import static org.junit.Assert.assertTrue;
 
 public class RandomIntegerTest {
 
-	private static final String  fmt = "%24s: %s%n";
+    private static final int RANGE = 10;
+    private RandomInteger ri = new RandomInteger(RANGE);
 
-	ReflectionHarness rh = new ReflectionHarness();
+    @Test
+    public void next_shouldReturnIntegerFromGivenRange() {
 
-	RandomInteger ri;
+        int next = ri.next();
 
-
-	@Before
-	public void setUp() throws Exception {
-		ri = new RandomInteger(  12434 );
-	}
-
-	@After
-	public void tearDown() throws Exception {
-	}
-
-
-	@Test
-	public void test1() {
-
-
-		rh.reflect( "org.onap.dmaap.dbcapi.util.RandomInteger", "get", "" );	
-	
-	}
-
-	@Test
-	public void test2() {
-		String v = "Validate";
-		rh.reflect( "org.onap.dmaap.dbcapi.util.RandomInteger", "set", v );
-
-	}
-
-	@Test
-	public void test3() {
-		int i = ri.next();
-
-	}
-
-
+        assertTrue(next >= 0 && next <= RANGE);
+    }
 
 }
 
diff --git a/src/test/java/org/onap/dmaap/dbcapi/util/RandomStringTest.java b/src/test/java/org/onap/dmaap/dbcapi/util/RandomStringTest.java
new file mode 100644
index 0000000..e549dc3
--- /dev/null
+++ b/src/test/java/org/onap/dmaap/dbcapi/util/RandomStringTest.java
@@ -0,0 +1,60 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * org.onap.dmaap
+ * ================================================================================
+ * Copyright (C) 2019 Nokia Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.dmaap.dbcapi.util;
+
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.ExpectedException;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+public class RandomStringTest {
+
+    private static final int LENGTH = 10;
+    @Rule
+    public ExpectedException thrown = ExpectedException.none();
+    private RandomString randomString = new RandomString(LENGTH);
+
+    @Test
+    public void nextString_shouldReturnStringWithGivenLength() {
+
+        String nextString = randomString.nextString();
+
+        assertEquals(LENGTH, nextString.length());
+    }
+
+    @Test
+    public void nextString_shouldReturnAlphanumeric() {
+
+        String nextString = randomString.nextString();
+
+        assertTrue(nextString.matches("[a-z0-9]*"));
+    }
+
+    @Test
+    public void constructor_shouldThrowExceptionForNegativeLength() {
+
+        thrown.expect(IllegalArgumentException.class);
+
+        new RandomString(-1);
+    }
+}
\ No newline at end of file
