@Test
public void testCheck() throws Exception
{

    doCallRealMethod().when( proxy ).check( any( RelationLink.class ), any( RelationLink.class ), anyMap() );
    doCallRealMethod().when( proxy ).check( any( RelationLink.class ), any( Collection.class ), anyMap() );
    RelationLink source = mock( RelationLink.class );
    RelationLink target = mock( RelationLink.class );
    Map<String, String> traits = Maps.newHashMap();
    traits.put( "a", "b" );
    RelationInfoManager relationInfoManager = mock( RelationInfoManager.class );
    doReturn( relationInfoManager ).when( relationManager ).getRelationInfoManager();
    proxy.check( null, target, traits );
    verify( relationInfoManager )
            .checkRelation( eq( target ), isA( RelationInfoMeta.class ), isNull( String.class ) );
    proxy.check( source, target, traits );
    verify( relationInfoManager )
            .checkRelation( eq( source ), eq( target ), isA( RelationInfoMeta.class ), isNull( String.class ) );
}