@Test public void adjustPassThrough() throws Exception { final Object modelObject = new Object(); Assert.assertEquals("should return modelObject", modelObject, springModelAdjuster.adjust(modelObject)); }
@Override public @Nullable Object adjust(@Nullable final Object obj) { if (obj instanceof Model) { final Model model = (Model) obj; return model.asMap().get("model"); } if (obj instanceof Map) { final Map map = (Map) obj; return map.get("model"); } return obj; }
SpringModelAdjuster implements ModelAdjuster { @Override public @Nullable Object adjust(@Nullable final Object obj) { if (obj instanceof Model) { final Model model = (Model) obj; return model.asMap().get("model"); } if (obj instanceof Map) { final Map map = (Map) obj; return map.get("model"); } return obj; } }
SpringModelAdjuster implements ModelAdjuster { @Override public @Nullable Object adjust(@Nullable final Object obj) { if (obj instanceof Model) { final Model model = (Model) obj; return model.asMap().get("model"); } if (obj instanceof Map) { final Map map = (Map) obj; return map.get("model"); } return obj; }  }
SpringModelAdjuster implements ModelAdjuster { @Override public @Nullable Object adjust(@Nullable final Object obj) { if (obj instanceof Model) { final Model model = (Model) obj; return model.asMap().get("model"); } if (obj instanceof Map) { final Map map = (Map) obj; return map.get("model"); } return obj; }  @Override @Nullable Object adjust(@Nullable final Object obj); void setModelKey(final String modelKey); String getModelKey(); }
SpringModelAdjuster implements ModelAdjuster { @Override public @Nullable Object adjust(@Nullable final Object obj) { if (obj instanceof Model) { final Model model = (Model) obj; return model.asMap().get("model"); } if (obj instanceof Map) { final Map map = (Map) obj; return map.get("model"); } return obj; }  @Override @Nullable Object adjust(@Nullable final Object obj); void setModelKey(final String modelKey); String getModelKey();  }