TodoItemViewModel extends BaseObservable implements Serializable { public float getOpacity() { return mTodo.isCompleted() ? 0.5f : 1.0f; } TodoItemViewModel(Todo todo); Todo getTodo(); ObservableInt getActionVisibility(); ObservableInt getDisableVisibility(); ObservableBoolean getEnableState(); ObservableInt getDividerVisibility(); void setTodo(Todo todo); void resetState(); void switchEnableWhenNotChoose(); void switchActionVisibility(); boolean isCompleted(); boolean actionShowing(); float getOpacity(); String getTitle(); String getDueDate(); Priority getPriority();  }
@Test public void testOpacityDefault() throws Exception { assertEquals(1.0f, mViewModel.getOpacity()); }