### Question:
MetadataMirrorReplicaLocationManager implements ReplicaLocationManager { @Override public Path getPartitionLocation(Partition sourcePartition) { if (tableType == UNPARTITIONED) { throw new UnsupportedOperationException("Not a partitioned table."); } if (!LocationUtils.hasLocation(sourcePartition)) { return null; } return new Path(sourcePartition.getSd().getLocation()); } MetadataMirrorReplicaLocationManager(SourceLocationManager sourceLocationManager, TableType tableType); @Override Path getTableLocation(); @Override Path getPartitionBaseLocation(); @Override void cleanUpLocations(); @Override void addCleanUpLocation(String pathEventId, Path location); @Override Path getPartitionLocation(Partition sourcePartition);  }### Answer:
@Test(expected = UnsupportedOperationException.class) public void unpartitionedTableLocationThrowsExceptionOnPartitionLocation() throws Exception { MetadataMirrorReplicaLocationManager replicaLocationManager = new MetadataMirrorReplicaLocationManager( sourceLocationManager, TableType.UNPARTITIONED); replicaLocationManager.getPartitionLocation(sourcePartition); }