FileStatus status2 = mock(FileStatus.class);
Path path2 = mock(Path.class);
when(path2.getName()).thenReturn("part-yyyyy");
when(status2.getPath()).thenReturn(path2);
FileSystem fs = mock(FileSystem.class);
when(fs.listStatus(path)).thenReturn(
new FileStatus[] { status1, status2 });
when(path.getFileSystem(conf)).thenReturn(fs);
when(conf.get(HIHOConf.EXTERNAL_TABLE_DML))
.thenReturn(
"create table age( i Number, n Varchar(20), a Number)organization external ( type oracle_loader default directory ext_dir access parameters (records delimited by newlinefields terminated by ','missing field values are null )location (/home/nube/:file.txt) reject' limit unlimited;");