@Override
    public String buildContext() {
        final ResourceDO after = (ResourceDO) getAfter();
        if (Objects.isNull(getBefore())) {
            return String.format("the resource [%s] is %s", after.getTitle(), StringUtils.lowerCase(getType().getType().toString()));
        }
        return String.format("the resource [%s] is %s : %s", after.getTitle(), StringUtils.lowerCase(getType().getType().toString()), contrast());
        
    }
@Test
    public void resourceChangeBuildContextTest() {

        final StringBuilder contrast = new StringBuilder();
        contrast.append(String.format("name[%s => %s] ", before.getName(), after.getName()));
        contrast.append(String.format("component[%s => %s] ", before.getComponent(), after.getComponent()));
        contrast.append(String.format("match icon[%s => %s] ", before.getIcon(), after.getIcon()));
        contrast.append(String.format("title[%s => %s] ", before.getTitle(), after.getTitle()));
        contrast.append(String.format("sort[%s => %s] ", before.getSort(), after.getSort()));
        contrast.append(String.format("perms[%s => %s] ", before.getPerms(), after.getPerms()));

        String typeStr = StringUtils.lowerCase(EventTypeEnum.RESOURCE_UPDATE.getType().toString());
        String context = String.format("the resource [%s] is %s : %s", after.getTitle(), typeStr, contrast);

        ResourceChangedEvent resourceChangedEvent = new ResourceChangedEvent(after, before, EventTypeEnum.RESOURCE_UPDATE, "test-operator");
        assertEquals(context, resourceChangedEvent.buildContext());
    }