Not sure where you live, but in the US it's actually his first and foremost responsibility to uphold a constitution that says that people are free from unreasonable searches and seizures.
I want to say "clearly you have never used US customs", though I suppose it's possible you have and you are just very lucky.
Spoiler alert: If not cooperating, then BPO not friendly; Else, please proceed.
than when CBP ask for password give it and watch them search the laptop..
You full filled your legal obligation to follow their orders despite the illegality its now their problem they cannot find anything
Note...all social public stuff is searchable on google..tweets facebook postings etc..
CBP never needs a password they are searching with that password for other reasons than the ones they GIVE
If an LEO (claims to) need access to something and you give him a dead end, it's his job to assume you're lying and find the next legal option available to him.
The real question you should be asking yourselves isn't "How would you outsmart the caveman cop in this situation?" Rather, it's "What can/will you do, as a citizen, to resist the erosion of our civil liberties?" Sadly, I have no easy answers here.