### Question:
SCMNodeStorageStatMap implements SCMNodeStorageStatMXBean { public void updateDatanodeMap(UUID datanodeID, Set<StorageLocationReport> report) throws SCMException { Preconditions.checkNotNull(datanodeID); Preconditions.checkNotNull(report); Preconditions.checkState(report.size() != 0); synchronized (scmNodeStorageReportMap) { if (!scmNodeStorageReportMap.containsKey(datanodeID)) { throw new SCMException("No such datanode", NO_SUCH_DATANODE); } scmNodeStorageReportMap.put(datanodeID, report); } } SCMNodeStorageStatMap(OzoneConfiguration conf); boolean isKnownDatanode(UUID datanodeID); List<UUID> getDatanodeList(
      UtilizationThreshold threshold); void insertNewDatanode(UUID datanodeID,
      Set<StorageLocationReport> report); void updateDatanodeMap(UUID datanodeID,
      Set<StorageLocationReport> report); StorageReportResult processNodeReport(UUID datanodeID,
      StorageContainerDatanodeProtocolProtos.NodeReportProto nodeReport); @Override long getCapacity(UUID dnId); @Override long getRemainingSpace(UUID dnId); @Override long getUsedSpace(UUID dnId); @Override long getTotalCapacity(); @Override long getTotalSpaceUsed(); @Override long getTotalFreeSpace(); void removeDatanode(UUID datanodeID); @Override Set<StorageLocationReport> getStorageVolumes(UUID datanodeID); double getScmUsedratio(long scmUsed, long capacity);  }### Answer:
@Test public void testUpdateUnknownDatanode() throws SCMException { SCMNodeStorageStatMap map = new SCMNodeStorageStatMap(conf); UUID unknownNode = UUID.randomUUID(); String path = GenericTestUtils.getTempPath( TestSCMNodeStorageStatMap.class.getSimpleName() + "-" + unknownNode .toString()); Set<StorageLocationReport> reportSet = new HashSet<>(); StorageLocationReport.Builder builder = StorageLocationReport.newBuilder(); builder.setStorageType(StorageType.DISK).setId(unknownNode.toString()) .setStorageLocation(path).setScmUsed(used).setRemaining(remaining) .setCapacity(capacity).setFailed(false); reportSet.add(builder.build()); thrown.expect(SCMException.class); thrown.expectMessage("No such datanode"); map.updateDatanodeMap(unknownNode, reportSet); }