unit testing - How to test hbase mapreduce code? -


class reduce {     private htable table = null;      protected void setup() {         table = new htable(context.getconfiguration,"tablename");     }      public void reduce() {         ...     } } 

i'd write unit test above code, not know how mock htable, run error (not find hbase-default.xml error..). think happened in new htable(). there methods mock object , pass reduce class?

now i'm using junit, mrunit, powermock+mockito.


Comments

Popular posts from this blog

java - Unable to make sub reports with Jasper -

sql - The object name contains more than the maximum number of prefixes. The maximum is 2 -

scala - play framework: Modules were resolved with conflicting cross-version suffixes -