InventoryViewModel extends BaseStockMovementViewModel { public static InventoryViewModel buildEmergencyModel(StockCard stockCard) { InventoryViewModel viewModel = new InventoryViewModel(stockCard.getProduct()); viewModel.stockCard = stockCard; return viewModel; } InventoryViewModel(StockCard stockCard);  InventoryViewModel(Product product); SpannableStringBuilder getStyledName(); SpannableStringBuilder getStyleType(); SpannableStringBuilder getStyledUnit(); boolean validate(); static InventoryViewModel buildEmergencyModel(StockCard stockCard); StockOnHandStatus getStockOnHandLevel(); Long getLotListQuantityTotalAmount(); String getFormattedProductName(); String getFormattedProductUnit(); @Override boolean equals(Object object); @Override int hashCode(); @Override String toString();  }
@Test public void shouldBuildEmergencyModel() throws Exception { StockCard stockCard = new StockCard(); stockCard.setId(1); stockCard.setProduct(ProductBuilder.buildAdultProduct()); InventoryViewModel inventoryViewModel = InventoryViewModel.buildEmergencyModel(stockCard); assertThat(inventoryViewModel.getStockCard().getId(), is(1L)); }