public static StringBuilder appendWithNullCheck(Object obj, String defaultValue, StringBuilder appender) {
        if (obj != null) {
            appender.append(obj.toString());
        } else {
            appender.append(defaultValue);
        }
        return appender;
    }
@Test
    public void testAppendWithNullCheck() {
        Assert.assertEquals("bar", EagleEyeCoreUtils.appendWithNullCheck(
                null, "bar", new StringBuilder()).toString());
        Assert.assertEquals("foo", EagleEyeCoreUtils.appendWithNullCheck(
                "foo", "bar", new StringBuilder()).toString());
    }