### Question:
ShortNameRenderer { public boolean isDatatype( String type ) { return shortNameService().isDatatype( type ); } ShortNameRenderer( ShortnameService sns, Iterable<Binding<Resource>> bindings ); ShortnameService shortNameService(); ShortnameService shortNameService( boolean required ); boolean isDatatype( String type ); Resource asResource( RDFNode r ); Resource asResource( String s ); String expand( String shortName ); String shorten( String uri, boolean memoise ); String shorten( String uri ); boolean hasShortNameService(); boolean isKnownShortnamePath( String path );  }### Answer:
@Test public void testIsDatatype() { final ShortnameService sns = context.mock( ShortnameService.class ); final ShortNameRenderer snr = new ShortNameRenderer( sns, null ); context.checking(new Expectations() {{ oneOf (sns).isDatatype( "foo" ); }}); snr.isDatatype( "foo" ); }