public String format(AlarmEntity alarmEntity) {
        StringBuilder message = new StringBuilder();
        for (int i = 0; i < formatSegments.size(); i++) {
            message.append(formatSegments.get(i));
            if (i != formatSegments.size() - 1) {
                switch (valueFroms.get(i)) {
                    case ID:
                        message.append(alarmEntity.getId0());
                        break;
                    case NAME:
                        message.append(alarmEntity.getName());
                }
            }
        }
        return message.toString();
    }
@Test
    public void testStringFormatWithArg() {
        AlarmMessageFormatter formatter = new AlarmMessageFormatter("abc} words {name} - {id} .. {");
        String message = formatter.format(new AlarmEntity("SERVICE", -1, "service", "1290", ""));
        Assertions.assertEquals("abc} words service - 1290 .. {", message);
    }