Extract test for dumping pkey with custom default function in separate method