UserViewModel extends BaseObservable { public String getUsername() { return user.getLogin(); } UserViewModel(User user); String getUsername(); String getImageUrl(); @BindingAdapter({ "bind:imageUrl" }) static void loadImage(ImageView view, String imageUrl); void setUser(User user);  }
@Test public void testGetUsername() throws Exception { Assert.assertEquals(mockUser.getLogin(), userViewModel.getUsername()); }