Thursday, December 6, 2012

Mockito: Java Unit Testing with Mock Objects


Mockito is an open source testing framework for Java. The framework allows the creation of Test Double objects called, “Mock Objects” in automated unit tests for the purpose of Test-driven Development (TDD) or Behavior Driven Development (BDD).
Mockito compared to EasyMock seems to be more easily and has more flexibility. First it’s able to mock up interfaces as well as classes. You doesn’t need additional Jar libraries. Furthermore there isn’t any replay mode. First you have to stub and afterwards you have to verificate your mocked classes or interfaces. 

Cassandra Quick Basics


Cassandra is a decentralized No-Sql database. It works on multi node cluster where every node is identical to every other node (server symmetry – all node features same). There is no master node concept, as in Hadoop, hence there is no single point of failure.
A few features/terms
  • Elastic scalability: able to scale, up or down, dynamically without restart or disruption of services.
  • Consistency level: decide when to consider transaction successful.
  • Tunable consistency (strict, casual, and weak), which is inversely proportional to availability.
  • Stores data in multidimensional hash table.
  • Schema free: model requires queries and then work on data.
  • Designed to take advantage of multiprocessor/core machines.
  • optimized for excellent throughput for write.
Data Model
  • Column, contains name value pair, is a most basic unit of data structure. Columns are Continue reading