@Test public void testForApp() { Activity activity = new Activity(); activity.setAppId(5L); activity.setAppType(EntityType.APPLICATION); Assert.assertEquals(ActivitySourceClassBridge.APPLICATION_PREFIX + Long.toString(5L), sut .objectToString(activity)); }
@Override public String objectToString(final Object msgObject) { Activity activity = (Activity) msgObject; EntityType appType = activity.getAppType(); Long appId = activity.getAppId(); if (appType != null && appId != null) { char prefix; switch (appType) { case APPLICATION: prefix = APPLICATION_PREFIX; break; case PLUGIN: prefix = PLUGIN_PREFIX; break; default: return "0"; } return prefix + Long.toString(activity.getAppId()); } return "0"; }
ActivitySourceClassBridge implements StringBridge { @Override public String objectToString(final Object msgObject) { Activity activity = (Activity) msgObject; EntityType appType = activity.getAppType(); Long appId = activity.getAppId(); if (appType != null && appId != null) { char prefix; switch (appType) { case APPLICATION: prefix = APPLICATION_PREFIX; break; case PLUGIN: prefix = PLUGIN_PREFIX; break; default: return "0"; } return prefix + Long.toString(activity.getAppId()); } return "0"; } }
ActivitySourceClassBridge implements StringBridge { @Override public String objectToString(final Object msgObject) { Activity activity = (Activity) msgObject; EntityType appType = activity.getAppType(); Long appId = activity.getAppId(); if (appType != null && appId != null) { char prefix; switch (appType) { case APPLICATION: prefix = APPLICATION_PREFIX; break; case PLUGIN: prefix = PLUGIN_PREFIX; break; default: return "0"; } return prefix + Long.toString(activity.getAppId()); } return "0"; }  }
ActivitySourceClassBridge implements StringBridge { @Override public String objectToString(final Object msgObject) { Activity activity = (Activity) msgObject; EntityType appType = activity.getAppType(); Long appId = activity.getAppId(); if (appType != null && appId != null) { char prefix; switch (appType) { case APPLICATION: prefix = APPLICATION_PREFIX; break; case PLUGIN: prefix = PLUGIN_PREFIX; break; default: return "0"; } return prefix + Long.toString(activity.getAppId()); } return "0"; }  @Override String objectToString(final Object msgObject); }
ActivitySourceClassBridge implements StringBridge { @Override public String objectToString(final Object msgObject) { Activity activity = (Activity) msgObject; EntityType appType = activity.getAppType(); Long appId = activity.getAppId(); if (appType != null && appId != null) { char prefix; switch (appType) { case APPLICATION: prefix = APPLICATION_PREFIX; break; case PLUGIN: prefix = PLUGIN_PREFIX; break; default: return "0"; } return prefix + Long.toString(activity.getAppId()); } return "0"; }  @Override String objectToString(final Object msgObject); static final char APPLICATION_PREFIX; static final char PLUGIN_PREFIX; }