Using AWK:
awk '{ seen[$0]++ } seen[$0] == 4' test.txt
This counts the number of times each line has been seen, and outputs a line when the count is exactly four (so lines seen four or more times are output once).
If you only want to see lines which appear exactly four times, use this instead:
awk '{ seen[$0]++ } END { for (line in seen) if (seen[line] == 4) print line }' test.txt