Yes it is possible (as of 2015). There is a special parameter, to use Adsense on Localhost without risks.
Today the AdSense code is different. If you want to add the adtest-parameter use data-adtest="on" within an ins block. Here is an example code:
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- XYZ 336 x 280 -->
<ins class="adsbygoogle"
style="display:inline-block;width:336px;height:280px"
data-ad-client="ca-pub-XXXXXXXXXXXXX"
data-adtest="on"
data-ad-slot="XXXXXXXXXXX"></ins>
<script>
</script>
Found this on Google AdManager Help:
It shows a basic tutorial on how to achieve this.
Test Ad Exchange tags without charging advertisers or recording clicks and impressions
Add the google_adtest = on; parameter to your ad tag to specify that this is a test implementation. Make sure you set this parameter to “on” to ensure that clicks and impressions aren’t recorded and advertisers aren’t charged. The default value is “off”.