@Test(expected = CamflakeException.class)
public void testGetIdThrowsExceptionWhenErrorOccurs() throws Exception {

    new Expectations(InetAddress.class) {
        {
            InetAddress.getLocalHost();
            result = new UnknownHostException();
        }
    };
    DefaultMachineId testee = new DefaultMachineId();
    testee.getId();
}