use of org.apache.qpid.proton.engine.impl.RecordImpl in project hono by eclipse.
the class HonoMessagingTest method newConnection.
private static ProtonConnection newConnection(final HonoUser user) {
final Record attachments = new RecordImpl();
attachments.set(Constants.KEY_CONNECTION_ID, String.class, CON_ID);
attachments.set(Constants.KEY_CLIENT_PRINCIPAL, HonoUser.class, user);
final ProtonConnection con = mock(ProtonConnection.class);
when(con.attachments()).thenReturn(attachments);
when(con.getRemoteContainer()).thenReturn("test-client");
return con;
}
Aggregations