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 testStringFormatWithNoArg() {
        AlarmMessageFormatter formatter = new AlarmMessageFormatter("abc words {sdf");
        String message = formatter.format(new AlarmEntity("SERVICE", -1, null, "", ""));

        Assertions.assertEquals("abc words {sdf", message);
    }