### Question:
DBTPMDeviceStateManager extends DBDeviceStateManager implements TPMDeviceStateManager { @Override public final TPMDeviceState getState(final Device device) throws TPMDeviceStateManagerException { try { return (TPMDeviceState) super.getState(device, TPMDeviceState.class); } catch (DeviceStateManagerException e) { throw new TPMDeviceStateManagerException(e); } } DBTPMDeviceStateManager(final SessionFactory factory); @Override final TPMDeviceState saveState(final TPMDeviceState state); @Override final TPMDeviceState getState(final Device device); @Override final void updateState(final TPMDeviceState state); @Override final boolean deleteState(final Device device);  }### Answer:
@Test(expectedExceptions = NullPointerException.class) public void testGetNull() { stateManager.getState(null); }
@Test public void testGetUnknown() { final TPMDeviceState savedState = stateManager.getState(device); Assert.assertNull(savedState); }