GroupedAlertMessageDecorator extends Decorator { public String generateTitle() { return String.format("[%s][XPipe 报警]", consoleConfig.getXpipeRuntimeEnvironment()); }  @Override String doGenerateTitle(AlertEntity alert); String generateTitle(); String generateBody(Map<ALERT_TYPE, Set<AlertEntity>> alerts); static final String ID; }
@Test public void generateTitle() throws Exception { Assert.assertEquals("[][XPipe 报警]", decorator.generateTitle()); }