@Test public void testCopy() throws Exception { final I18NModel model = new NonI18NModel("Some text"); final I18NModel copy = model.copy(); assertEquals(copy, model); copy.putValue(I18NModel.DEFAULT, "Changed"); assertEquals("Some text", model.getValue("EN")); assertEquals("Changed", copy.getValue("EN")); }
@Override public I18NModel copy() { return new NonI18NModel(value); }
NonI18NModel implements I18NModel { @Override public I18NModel copy() { return new NonI18NModel(value); } }
NonI18NModel implements I18NModel { @Override public I18NModel copy() { return new NonI18NModel(value); } NonI18NModel(final String value); }
NonI18NModel implements I18NModel { @Override public I18NModel copy() { return new NonI18NModel(value); } NonI18NModel(final String value); @Override String getValue(final String locale); @Override void putValue(final String locale, final String value); @Override Map<String, String> getAllValues(); @Override I18NModel copy(); @Override boolean equals(final Object o); @Override int hashCode(); @Override String toString(); }
NonI18NModel implements I18NModel { @Override public I18NModel copy() { return new NonI18NModel(value); } NonI18NModel(final String value); @Override String getValue(final String locale); @Override void putValue(final String locale, final String value); @Override Map<String, String> getAllValues(); @Override I18NModel copy(); @Override boolean equals(final Object o); @Override int hashCode(); @Override String toString();  }