NMP's blog :)


/dev/kvm permission denied on Ubuntu 18.04

I got this error when I was trying to create an emulator: /dev/kvm permission denied I did several things to fix it. sudo apt install qemu-kvm sudo chown /dev/kvm <your_username> Logout and Login again The error should...


Mockito anyString() vs any() – null handling

Sometimes, when I mock a method in Mockito, I used anyString instead of any and I get into a mess and my test fails. Why? given(mUserRepo.getUser(anyString(). any())).willReturn(new User()); And what will happen if mUserRepo.getUser(null);...


.blockingGet & AndroidSchedulers.mainThread() make the app stuck

Recently, I had a very strange problem to debug. I had the following interactor: public class GetUserUpdatesInteractor { private final UserRepository mUserRepository; private final InteractorSchedulers mSchedulers; @Inject public GetUserUpdatesInteractor(UserRepository userRepository, InteractorSchedulers schedulers) { mUserRepository...