### Question:
Pherf { public Properties getProperties() { return this.properties; } Pherf(String[] args); Properties getProperties(); static void main(String[] args); void run();  }### Answer:
@Test public void testInvalidLogPerNRowsArgument() throws Exception { Long zero = 0l; Long negativeOne = -1l; String invaildNum = "abc"; String[] args = {"-listFiles", "-log_per_nrows", zero.toString()}; assertEquals(Long.valueOf(PherfConstants.LOG_PER_NROWS), getLogPerNRowsValue(new Pherf(args).getProperties())); String[] args2 = {"-listFiles", "-log_per_nrows", negativeOne.toString()}; assertEquals(Long.valueOf(PherfConstants.LOG_PER_NROWS), getLogPerNRowsValue(new Pherf(args2).getProperties())); String[] args3 = {"-listFiles", "-log_per_nrows", invaildNum}; assertEquals(Long.valueOf(PherfConstants.LOG_PER_NROWS), getLogPerNRowsValue(new Pherf(args3).getProperties())); }
@Test public void testDefaultLogPerNRowsArgument() throws Exception { String[] args = {"-listFiles"}; assertEquals(Long.valueOf(PherfConstants.LOG_PER_NROWS), getLogPerNRowsValue(new Pherf(args).getProperties())); }
@Test public void testCustomizedLogPerNRowsArgument() throws Exception { Long customizedPerNRows = 15l; String[] args = {"-listFiles", "-log_per_nrows", customizedPerNRows.toString()}; assertEquals(customizedPerNRows, getLogPerNRowsValue(new Pherf(args).getProperties())); }