HiveClient result = mock(HiveClient.class);
if (ClientResult.RETURN_OK.equals(this.result)) {
List<String> fetchResult = new ArrayList<String>(1);
fetchResult.add("test result");
try {
when(result.fetchN(anyInt())).thenReturn(fetchResult);
} catch (HiveServerException e) {
} catch (Exception e) {
}
} else if (ClientResult.RETURN_SERVER_EXCEPTION.equals(this.result)) {
HiveServerException exception = new HiveServerException("test HiveServerException", 10,