### Question:
EditGroupsForComponentPermissionVm extends TwoSideListWithFilterVm<Group> { @Command public void cancel() { openGroupsPermissionsWindow(); } EditGroupsForComponentPermissionVm(@Nonnull WindowManager windowManager,
                                              @Nonnull PermissionsService permissionsService,
                                              @Nonnull GroupService groupService,
                                              @Nonnull SelectedEntity<Object> selectedEntity); @Command @NotifyChange({AVAIL_PROPERTY, EXIST_PROPERTY, AVAIL_SELECTED_PROPERTY, EXIST_SELECTED_PROPERTY}) void filterAvail(); @Command @NotifyChange({AVAIL_PROPERTY, EXIST_PROPERTY, AVAIL_SELECTED_PROPERTY, EXIST_SELECTED_PROPERTY}) void filterExist(); @Command void cancel(); @Command void save(); @Init void initVm(); @Override void updateVm(); static final String GROUPS_PERMISSIONS_ZUL; }### Answer:
@Test(dataProvider = "dataProvider") public void testCancelWithoutChanges(PermissionForEntity permissionForEntity, GroupsPermissions<GeneralPermission> groupsPermissions) throws NotFoundException { initTest(permissionForEntity, groupsPermissions); viewModel.cancel(); vefiryNothingChanges(); }
@Test(dataProvider = "dataProvider") public void testCancelWithChanges(PermissionForEntity permissionForEntity, GroupsPermissions<GeneralPermission> groupsPermissions) throws NotFoundException { initTest(permissionForEntity, groupsPermissions); viewModel.addAll(); viewModel.cancel(); vefiryNothingChanges(); }