### Question:
StackInfoMapper { protected HeatStatus mapStatus(String status) { final HeatStatus result; if (status == null) { result = HeatStatus.INIT; } else { result = heatStatusMap.getOrDefault(status, HeatStatus.UNKNOWN); } return result; } StackInfoMapper(Stack stack); StackInfo map();  }### Answer:
@Test public void checkHeatStatusMap() { StackInfoMapper mapper = new StackInfoMapper(null); assertEquals(HeatStatus.BUILDING, mapper.mapStatus("CREATE_IN_PROGRESS")); assertEquals(HeatStatus.CREATED, mapper.mapStatus("CREATE_COMPLETE")); assertEquals(HeatStatus.FAILED, mapper.mapStatus("CREATE_FAILED")); assertEquals(HeatStatus.DELETING, mapper.mapStatus("DELETE_IN_PROGRESS")); assertEquals(HeatStatus.NOTFOUND, mapper.mapStatus("DELETE_COMPLETE")); assertEquals(HeatStatus.FAILED, mapper.mapStatus("DELETE_FAILED")); assertEquals(HeatStatus.UPDATING, mapper.mapStatus("UPDATE_IN_PROGRESS")); assertEquals(HeatStatus.FAILED, mapper.mapStatus("UPDATE_FAILED")); assertEquals(HeatStatus.UPDATED, mapper.mapStatus("UPDATE_COMPLETE")); assertEquals(HeatStatus.INIT, mapper.mapStatus(null)); assertEquals(HeatStatus.UNKNOWN, mapper.mapStatus("status-not-there")); }