public class AccountInterfaceTest extends AbstractEntityServiceTest {
public void testSetAccountInterface() throws Exception {
final Interface intf = stubInterface(true);
final InterfaceOption io = intf.getOptions().iterator().next();
final Account a = stub(Asp.class, true);
final AccountInterface ai = stubAccountInterface(intf, a, false);
getInterfaceService().setAccountInterface(ai);
BusinessKeyFactory bkf = new BusinessKeyFactory(new EntityMetadata());
final IBusinessKey<InterfaceOptionAccount> bk = bkf.create(InterfaceOptionAccount.class, "Option Id and Account Id");
bk.setPropertyValue("option.id", io.getId());
bk.setPropertyValue("account.id", a.getId());
final InterfaceOptionAccount ioa = getDao().load(bk);
Assert.assertNotNull(ioa);
}