public class LocationHandlerTest extends BaseHandlerTest {
public void testApplyInputStream() {
InputStream is = getClass().getResourceAsStream("/location.xml");
Location result = factory.create(injector.getInstance(LocationHandler.class)).parse(is);
Location expects = Location.builder().id("41").name("RTP").description("RTP usrdtsa0a1ccxra").location("RTP")
.state(Location.State.ONLINE).capability(Capabilities.CAPABILITY_FORMAT,
ImmutableMap.<String, String> of("EXT3", "ext3", "RAW", "raw")).capability(
Capabilities.CAPABILITY_I386).capability(Capabilities.CAPABILITY_x86_64)
.capability(Capabilities.CAPABILITY_AVAILABILITYAREA).build();
assertEquals(result.toString(), expects.toString());
}