@Test
    public void create_upper_transport_pdu_access_message_isCorrect() {
        Mockito.mock(Log.class);
        final String expectedTransportPdu = "89511bf1d1a81c11dcef".toUpperCase(Locale.US);
        final byte[] deviceKey = MeshParserUtils.toByteArray("9d6dd0e96eb25dc19a40ed9914f8f03f");
        final int src = 0x1201;
        final int dst = 0x0003;
        final byte[] sequenceNumber = MeshParserUtils.toByteArray("000006");
        final byte[] ivIndex = MeshParserUtils.toByteArray("12345678");
        final int ctl = 0x00;
        final byte aszmic = 0;
        final int akf = 0;
        final byte[] accessPdu = MeshParserUtils.toByteArray("800300563412");

        final ProvisionedMeshNode meshNode = new ProvisionedMeshNode();
        final MeshTransport meshLayerTestBase = new MeshTransport(context, meshNode);
        final AccessMessage accessMessage = new AccessMessage();
        accessMessage.setSrc(src);
        accessMessage.setDst(dst);
        accessMessage.setSequenceNumber(sequenceNumber);
        accessMessage.setIvIndex(ivIndex);
        accessMessage.setDeviceKey(deviceKey);
        accessMessage.setAkf(akf);
        accessMessage.setAszmic(aszmic);
        accessMessage.setAccessPdu(accessPdu);
        meshLayerTestBase.createUpperTransportPDU(accessMessage);
        assertEquals(expectedTransportPdu, MeshParserUtils.bytesToHex(accessMessage.getUpperTransportPdu(), false));
    }
Example local unit test, which will execute on the development machine (host).

@see <a href="http://d.android.com/tools/testing">Testing documentation</a>
mesh/src/test/java/no/nordicsemi/android/mesh/transport/UpperTransportLayerTests.java