### Question:
GoraInputSplit extends InputSplit implements Writable, Configurable { @Override public String[] getLocations() { return query.getLocations(); } GoraInputSplit();  GoraInputSplit(Configuration conf, PartitionQuery<?,?> query); @Override Configuration getConf(); @Override void setConf(Configuration conf); @Override long getLength(); @Override String[] getLocations(); PartitionQuery<?, ?> getQuery(); @Override void readFields(DataInput in); @Override void write(DataOutput out); @Override boolean equals(Object obj);  }### Answer:
@Test public void testGetLocations() throws IOException { List<PartitionQuery<String, MockPersistent>> partitions = getPartitions(); int i=0; for(PartitionQuery<String, MockPersistent> partition : partitions) { GoraInputSplit split = new GoraInputSplit(conf, partition); assertEquals(split.getLocations().length, 1); assertEquals(split.getLocations()[0], MockDataStore.LOCATIONS[i++]); } }
@Test public void testGetLocations() throws IOException { List<PartitionQuery<String, MockPersistent>> partitions = getPartitions(); int i=0;; for(PartitionQuery<String, MockPersistent> partition : partitions) { GoraInputSplit split = new GoraInputSplit(conf, partition); Assert.assertEquals(split.getLocations().length, 1); Assert.assertEquals(split.getLocations()[0], MockDataStore.LOCATIONS[i++]); } }