@Test
public void testOffsetInsideInstancesWithComponentPropertiesAndWithInheritance() throws Exception {

	// Expected: variables, "channels:", "name:", instance of, instance of block
	Map<String,String> expected = new LinkedHashMap<> ();
	expected.put( "c1.ip: ",  CompletionUtils.SET_BY_ROBOCONF );
	expected.put( "c1.port: ", CompletionUtils.DEFAULT_VALUE + "8100" );
	expected.put( "c1.v1: ", CompletionUtils.DEFAULT_VALUE + "version1" );
	expected.put( "c1.v2: ", CompletionUtils.DEFAULT_VALUE + "version2" );
	expected.put( PROPERTY_INSTANCE_CHANNELS + ": ", null );
	expected.put( "f1.v1: ", CompletionUtils.DEFAULT_VALUE + "version1" );
	expected.put( "f1.v2: ", CompletionUtils.DEFAULT_VALUE + "version2" );
	expected.put( PROPERTY_INSTANCE_NAME + ": ", null );
	Couple couple = prepare( "app3", "initial.instances", 135 );
	List<RoboconfCompletionProposal> proposals = couple.proposer.findProposals( couple.text );
	Assert.assertEquals( expected.size() + 2, proposals.size());
	int index = 0;
	for( Map.Entry<String,String> entry : expected.entrySet()) {
		Assert.assertEquals( entry.getKey(), proposals.get( index ).getProposalName());
		Assert.assertEquals( entry.getKey(), proposals.get( index ).getProposalString());
		Assert.assertEquals( entry.getValue(), proposals.get( index ).getProposalDescription());
		Assert.assertEquals( 0, proposals.get( index ).getReplacementOffset());
		index ++;
	}
	Assert.assertEquals( KEYWORD_INSTANCE_OF, proposals.get( index ).getProposalName());
	Assert.assertEquals( INSTANCE_OF_PREFIX, proposals.get( index ).getProposalString());
	Assert.assertNull( proposals.get( index ).getProposalDescription());
	Assert.assertEquals( 0, proposals.get( index ).getReplacementOffset());
	index ++;
	Assert.assertEquals( INSTANCE_OF_BLOCK, proposals.get( index ).getProposalName());
	Assert.assertTrue( proposals.get( index ).getProposalString().startsWith( INSTANCE_OF_PREFIX ));
	Assert.assertTrue( proposals.get( index ).getProposalDescription().startsWith( INSTANCE_OF_BLOCK ));
	Assert.assertEquals( 0, proposals.get( index ).getReplacementOffset());
}