src: Making use of DEPRECATED macro and updating library code not to use deprecated methods

Change-Id: Ibe17977e7fcbb759a26dbe1cfa3d472598e49bcc
diff --git a/tests/test-block.cpp b/tests/test-block.cpp
index a4183f9..49ce204 100644
--- a/tests/test-block.cpp
+++ b/tests/test-block.cpp
@@ -553,22 +553,23 @@
   typedef boost::iostreams::stream<boost::iostreams::array_source> ArrayStream;
   ArrayStream stream(reinterpret_cast<const char*>(TEST_BUFFER), sizeof(TEST_BUFFER));
 
+
   Block testBlock;
-  BOOST_REQUIRE_NO_THROW(testBlock = Block(stream));
+  BOOST_REQUIRE_NO_THROW(testBlock = Block::fromStream(stream));
   BOOST_CHECK_EQUAL(testBlock.type(), 0);
   BOOST_CHECK_EQUAL(testBlock.size(), 3);
   BOOST_CHECK_EQUAL(testBlock.value_size(), 1);
   BOOST_CHECK_EQUAL(*testBlock.wire(),  0x00);
   BOOST_CHECK_EQUAL(*testBlock.value(), 0xfa);
 
-  BOOST_REQUIRE_NO_THROW(testBlock = Block(stream));
+  BOOST_REQUIRE_NO_THROW(testBlock = Block::fromStream(stream));
   BOOST_CHECK_EQUAL(testBlock.type(), 1);
   BOOST_CHECK_EQUAL(testBlock.size(), 3);
   BOOST_CHECK_EQUAL(testBlock.value_size(), 1);
   BOOST_CHECK_EQUAL(*testBlock.wire(),  0x01);
   BOOST_CHECK_EQUAL(*testBlock.value(), 0xfb);
 
-  BOOST_CHECK_THROW(testBlock = Block(stream), Tlv::Error);
+  BOOST_CHECK_THROW(Block::fromStream(stream), Tlv::Error);
 }
 
 BOOST_AUTO_TEST_CASE(Equality)