I want to set emit value for observable property/ the below is the code
export class PostListComponent implements OnInit {
errorMessage = '';
loggedInUser: User | undefined;
cachedPost: Post | undefined;
private selectedTabSubject = new BehaviorSubject<number>(0);
selectedTabAction$ = this.selectedTabSubject.asObservable();
selectedTabAction$ is the property which subscribe to the control action i.e on dropdown list changes and returns selected value.
how can i mock /spyon this property so that i can control what value i want in a unit test.