private void testCreateOrUpdateForUpdate() {
        MetaDataDO metaDataDO = MetaDataDO.builder().build();
        when(metaDataDTO.getId()).thenReturn("id");
        when(metaDataDTO.getPath()).thenReturn("path");
        when(metaDataDTO.getNamespaceId()).thenReturn(SYS_DEFAULT_NAMESPACE_ID);
        when(metaDataMapper.pathExistedExclude("path", Collections.singletonList("id"))).thenReturn(null);
        when(metaDataMapper.selectById("id")).thenReturn(metaDataDO);
        when(metaDataMapper.update(any())).thenReturn(1);

        String msg = metaDataService.createOrUpdate(metaDataDTO);
        assertEquals(ShenyuResultMessage.UPDATE_SUCCESS, msg);
    }
Cases where check passed and update operation.<br>
The stub declared in createOrUpdateCase1 and createOrUpdateCase3 will not be repeated.
shenyu-admin/src/test/java/org/apache/shenyu/admin/service/MetaDataServiceTest.java