public void testConnectWellKnownServiceWithServiceUnavailable() throws Exception {
DummyServiceAccessPoint serviceAccessPoint = new DummyServiceAccessPoint(COM_ANDROID_NPP);
serviceAccessPoint.setAcceptConnections(false);
connectionManager.registerWellKnownServiceAccessPoint(COM_ANDROID_NPP, serviceAccessPoint);
Connect connect = new Connect(0x01, 0x32, new ServiceName(COM_ANDROID_NPP));
AbstractProtocolDataUnit processPdu = connect.processPdu(connectionManager);
assertTrue(processPdu instanceof DisconnectedMode);
assertEquals(3, ((DisconnectedMode)processPdu).getReason());
}
@Test